Merge two images to create a single image in C#.Net

This method merge two images one in the top of the other you can modify the code to meet for your needs: public static Bitmap MergeTwoImages(Image firstImage, Image secondImage) { if (firstImage == null) { throw new ArgumentNullException(“firstImage”); } if (secondImage == null) { throw new ArgumentNullException(“secondImage”); } int outputImageWidth = firstImage.Width > secondImage.Width ? … Read more

Tint image using CSS without overlay

Eventually it will be, using shaders. See the W3C Docs on Filters. At the moment, what is possible for instance is: -webkit-filter: grayscale; /*sepia, hue-rotate, invert….*/ -webkit-filter: brightness(50%); See David Walsh on CSS Filters Stackoverflow: apply a rose tint…: W3C Filter Effects 1.0 Docs – 38.2.5. Other uniform variables: the CSS shaders parameters Update: Adobe … Read more

Resize an image with Paperclip

You can use “160×160#” which will scale and crop to exactly that size, which is unique to paperclip. Otherwise you can use any of the ImageMagick geometry strings, detailed here: ImageMagick Geometry But I’ll quote the one you’re interested in: “160×160!” Width and height emphatically given, original aspect ratio ignored.

How to convert XCF to PNG using GIMP from the command-line?

Before jsbueno posted his answer I had also tried asking on the #gimp IRC channel. I was directed to this thread on Gimptalk which contains the following code: gimp -n -i -b – <<EOF (let* ( (file’s (cadr (file-glob “*.xcf” 1))) (filename “”) (image 0) (layer 0) ) (while (pair? file’s) (set! image (car (gimp-file-load … Read more

Reducing the file size of a very large images, without changing the image dimensions

PNG is not a lossy image format, so you would likely need to convert the image into another format– most likely JPEG. JPEG has a settable “quality” factor– you could simply keep reducing the quality factor until you got an image that was small enough. All of this can be done without changing the image … Read more