Archive for November, 2014

Batch resizing images in CLI

Posted: November 17, 2014 in CLI, Linux, Ubuntu

Make sure you have installed Image Magic


sudo apt-get install imagemagick

And then, from the command line:

mogrify -resize 50% *png      # keep image aspect ratio
mogrify -resize 320x240 *png  # keep image aspect ratio
mogrify -resize 320x240! *png # don't keep image aspect ratio
mogrify -resize x240 *png     # don't keep image aspect ratio
mogrify -resize 320x *png     # don't keep image aspect ratio