Imagemagick

From Helpful

These are primarily notes
This is probably not going to be complete in any real sense, and exists to contain bits of useful information.
This article/section is a stub — probably a pile of half-sorted notes and assertions some of which may well be wrong, and not verified as a whole. Feel free to add or refine.

convert/mogrify notes

The command line swiss army knife for image conversions

http://www.imagemagick.org/script/command-line-processing.php



On geometry specifications

See e.g.

Note you can in some cases not specify the size at all.

For example, to take 5 pixels off the top and left, 15 off the right, and 10 off the bottom edge, without specifying an image size:

convert -crop +5+5 -crop -15-10 bordered.png borderless.png

Errors

This article/section is a stub — probably a pile of half-sorted notes and assertions some of which may well be wrong, and not verified as a whole. Feel free to add or refine.


Convert: geometry does not contain image

Can be triggered by using -trim while the entire image is just one color.


Editing Unknown field with tag 40961 (0xa001) encountered. `TIFFReadCustomDirectory'.

This is a warning, telling you that this field has been ignored. This particular tag refers to the color space, meaning that the colors may not be interpreted as specified - which can have an effect anywhere between none at all and 'uuuuugly'.