Resize multiple image on Linux

I think we all know how to resize image or photo. But this job can be very tedious if we want to resize multiple photos, say hundreds of photos.

Fortunately it is very easy to do this kind of thing in Linux. I will show you how to do it on Debian Squeeze.

First install “imagemagick”:

sudo apt-get install imagemagick

And then go to photo’s folder (for example: ~/Bilder):

cd ~/Bilder

If you want to resize all the image width to 800 pixel and keep the aspect ratio just do:

mogrify -resize 800 *.jpg

If you want to set new aspect ratio (for example 800×600 pixel):

mogrify -resize 800x600! *.jpg

That’s it!