Imagemagick
📃 These are primarily notes, intended to be a collection of useful fragments, that will probably never be complete in any sense. |
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.
- http://www.imagemagick.org/script/command-line-processing.php#geometry
- http://www.imagemagick.org/Magick++/Geometry.html
You can sometimes avoid having to know the image size.
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
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'.