Skip to main content
5 votes
Accepted

Imagemagick: how to compare two images and obtain a third image with the differences?

It's the first example in the ImageMagick documentation: magick compare -compose src du2SX.png ejUjy.png difference.png magick difference.png -transparent "#CCCCCC" alpha.png In "difference.png" the ...
Glenn Randers-Pehrson's user avatar
5 votes
Accepted

Convert 8bit sRGB to 4bit grayscale with ImageMagick

No idea why but identify seems to always assume sRGB. Your image should actually be grayscale. If you use the -verbose option it will report the correct color space. For the bit-depth you need to ...
Cai's user avatar
  • 40.7k
4 votes

Drop shadow for animated GIF

Simply enlarge your document, add a background color as the background color where the GIF will be placed, then add your shadow to your GIF. This is the only way. If your output is for the web, you ...
Sasha Chirico's user avatar
4 votes

Drop shadow for animated GIF

For GIF the drop shadow is going to be complicated for two reasons: The drop shadow on your PNG relies on partial opacity to blend the shadow with the page background. But the GIF format doesn't ...
xenoid's user avatar
  • 17.2k
4 votes

How to resample an image with lanczos-3 filter using imagemagick?

This question is somehow wrong in many ways but warrants an answer nonetheless to get you onto the right track. There is no image when you have no post processing of the Lanczos filter. See the filter ...
joojaa's user avatar
  • 58.1k
4 votes
Accepted

ImageMagick: distort perspective according to a vector path

Yes. Take for example following images, Images 1-2: Foreground and background Then using following imagemagick shell script*: convert ^ bg.png ^ ...
joojaa's user avatar
  • 58.1k
4 votes

If I have a .gif and a .png file, can I compare them to see if they are same image?

Open both images on your photo editing software. Let's say it is Gimp. Copy the GIF image on the clipboard and paste it over the PNG (Not the other way around)* Change the blending mode to ...
Rafael's user avatar
  • 37.6k
3 votes

Is there a way to rename images based on their dominant color?

OK so after some considerable searching I've now found a solution to this 'dilemma' of mine... Yay! Saved me so much work The main key to making all of this possible at all is the ridiculously ...
BANG's user avatar
  • 1,774
3 votes

Extract similarities between bunch of image to remove stains on gimp or imagemagick

To always remove stains or dust from the exact same areas of several images the following workflow using Gimp may lead to satisfactory (but not perfect) results. Obtain despeckle mask Take an image ...
Takkat's user avatar
  • 12.5k
3 votes

Convert batch EPS to SVG using ImageMagick?

As has been said by others, ImageMagick isn't really for vector-to-vector conversion. I don't have much experience using Inkscape with .eps files, so I don't know reliable it is for ones that weren't ...
ssokolow's user avatar
  • 131
3 votes
Accepted

flip an ico-image without quality loss or size increase

In order to get the flag -depth 4 work, you should use also the flag -colors with the desired color depth (in your case 16). The following command should generate an icon with the same size of the ...
Paolo Gibellini's user avatar
3 votes

Why do some of my PNG images not have transparent backgrounds in certain circumstances?

Purely looking at the data.. it appears as though you have PNG8 and PNG32 images... Simply examining the Properties: Correct image... Properties: date:create: 2021-01-23T17:41:03-06:00 date:...
Scott's user avatar
  • 210k
2 votes

How To Estimate Brightness-Contrast Value of Gray Figure?

I don't think you can see this in terms of brightness/contrast, what you can do is using Levels, make sure that the histograms of both images have the same span (one may not have blacks or whites) ...
xenoid's user avatar
  • 17.2k
2 votes
Accepted

Drop shadow for animated GIF

Since v2.19, ScreenToGif lets you add dropshadows to your recordings/animations. You can manually add the shadows while editing: Or you can set a task to add the shadow after recording: These ...
Nicke Manarin's user avatar
2 votes

How does tinypng.com minimize pictures?

On linux you can losslessly optimize you png images with optipng which does not all the effect like tinyPNG does, but already some percent. optimize all your images in the current folder with: sudo ...
rubo77's user avatar
  • 139
2 votes

How does tinypng.com minimize pictures?

For Gimp You can get color-indexed PNG in Gimp by changing the image mode to Color-indexed before exporting. However, this restricts you to a binary alpha channel (in other words, this won't support ...
xenoid's user avatar
  • 17.2k
2 votes
Accepted

A best way to compress a png atlas with transparency

pngquant has option to set quality. From pngquant man page -Q min-max, --quality min-max min and max are numbers in range 0 (worst) to 100 (perfect), similar to JPEG. pngquant will ...
Abdullah Ibn Fulan's user avatar
1 vote
Accepted

Convert SVG with ex units to jpg

ImageMagick's convert function is going to call Inkscape for SVG images, which doesn't know anything about relative unit measure (such as ex). Nonetheless, browsers are very good with those units. ...
Davide_sd's user avatar
  • 145
1 vote

ImageMagick: define 16 million as colors

After some to-and-fro in the comments, I think I know what the real problem is here. I don't think has it has anything to do with imagemagick or your commands failing. It's down to confusion over how ...
Billy Kerr's user avatar
  • 87.2k
1 vote

Batch background removal on non-uniform images

I think I've found you a GIMP solution. This repo has a nice script/plugin solution to help you automatically separate images. It's not perfect but it should get you close. Following this guide. ...
Stegathesaurus's user avatar
1 vote

How to batch add whitespace to rectangular images so they all will be square?

If I understand this correctly I would go with trying to do this on actions in PS, first create your 128x128px file, start recording and then, select all, align it to center, flatten image, save as ...
FabianCS's user avatar
1 vote
Accepted

Cut out part of image canvas

For Gimp: With two of the scripts you'll find here: ofn-guillotine-layer and arrange-layers (arrange-layers is describe in more details here: Create horizontal guides where you want cuts to happen ...
xenoid's user avatar
  • 17.2k
1 vote

Method to find coordinates of where image is cropped

Create the image to the size you want to submit Make a horizontal "Hue" gradient (with value=100%) Add a layer, make a vertical black to white color gradient, and set layer mode to "Multiply" or ("...
xenoid's user avatar
  • 17.2k
1 vote

Is there a way to rename images based on their dominant color?

Now that i have a bit of time to address the question, that is in generally better suited for Stack Overflow than here. Lets add some more possibilities. While I in general think that ImageMagick/...
joojaa's user avatar
  • 58.1k
1 vote
Accepted

Is there a way to rename images based on their dominant color?

Because of my 'problem' I managed to inspire the creators of ImageMagick to add support for the 'hex' property for this output... To do what I've done in the answer above now takes only the following:...
BANG's user avatar
  • 1,774
1 vote

Imagemagick: how to compare two images and obtain a third image with the differences?

Glenn's answer still mostly works six years later. You'll just need to make slight adjustments to the highlight and lowlight color. magick compare -highlight-color "#c00018" -lowlight-color ...
Philipp's user avatar
  • 11

Only top scored, non community-wiki answers of a minimum length are eligible