convert
the is one of the best tool for deal with images, here lists come of the typical usages:
$ identify original.png
$ convert -resize 800 original.png original-resized.png
$ convert -size 100x100 canvas:khaki canvas_khaki.gif
...
convert: unable to read font `(null)' @ error/annotate.c/RenderFreetype/1126.
convert: Postscript delegate failed `/var/tmp/magick-13710XhoO7okPHHKJ': No such file or directory @ error/ps.c/ReadPSImage/840.
...
This tells you that you are missing some fonts should be there, to solve this, just install the ghostscript:
$ brew install ghostscript
and you are now set.
create thumbnails for images:
mogrify -resize 420x280 -background "#cccccc" -gravity center -extent 420x280 -format jpg -path thumbs thumbs/*.jpg
this command will create thumbsnail in size 420x280
, and will fulfill the #cccccc
if the resized image is not fit. and the final format is jpg
, origin files are thumbs/*.jpg
.