Wednesday, June 18, 2008

Batch Resize Image Files with ImageMagick

There is a useful open source software for manipulating image files. No, I'm not talking about GIMP but rather another software suite called ImageMagick. ImageMagick can read, convert and write images in a variety of formats including JPEG, PNG and even PDF. It comes with command line utilities like convert, mogrify, identify, composite, etc. The main reason I am mentioning ImageMagick is that I like to use its mogrify utility to resize a large number of image files for display on my Palm Tungsten device. High resolution images cannot be displayed on my PDA due to insufficient memory - so I have to resize the images to a lower resolution. Photoshop has a graphical resize tool but Photoshop is not free and it takes a longer time to fire up. With ImageMagick, all I have to do is open up a Command Window and type in the following commands:

C:\> mogrify -resize 90% *.jpg

The above command will resize all files with the extension JPG to 90% of their original resolutions.

Note: Make copies of your files before using mogrify as it will make the adjustments on the actual files.

No comments: