Get in touch:
01524 851 877
07718 896 553

Resizing Images With Mogrify

Posted on Nov 23 2009

I needed to resize a few images in a directory recently and knew there would be a much more convenient method than opening gimp on each image, resizing etc etc.

A quick google search and I came across the ‘mogrify’ command. This is part of the ImageMagick suite. This is a nice simple command that allows you to resize images from the CLI.

An example usage would be :

mogrify -resize 640x480 *.jpg
This would resize every .jpg image in the current directory to 640×480. I needed to resize them all to a fixed width and the following code achieves this.

mogrify -resize 640 *.jpg

This will definitely make my life a little easier in the future…