Image Magick Cheat Sheet

When I import a lot of pictures from my camera SD card, some standard transformations need to take place:

ImageMagick is the tool I use.

Rotate picture according to EXIF info:

mogrify -auto-orient *JPG

Convert all JPG images and output to a new directory with png format:

mogrify -resize 1080 -auto-orient -path conv -format png *JPG

If you have already rotated some pictures, the resize will not work as expected. The easiest way to have properly sized images is to use the area of the image as resize parameter. If you want images at the format 1080×720 then the area is 1080 * 720 = 777600 pixel:

mogrify -resize 777600@ -auto-orient -path conv *JPG

Leave a Reply

Your email address will not be published.