Sun 23 Dec 2007
What do you do when you have to resize over 30,000 images to two different sizes (thumbnail and cropped), while keeping the aspect ratio?
Hmm… I thought ACDSee or VSO Image Resizer were my only viable options but no; Mogrify, from ImageMagick,is actually a much more potent option and it is available right on my CentOs Server!
Here is how to resize all jpg images in the current directory with Mogrify:
mogrify -resize 266 *.jpg
What if the directory containedvery large number of images? In that case, here is the trick:
find -name “*.jpg” -type f -exec mogrify -resize 266 {} \;
Mogrify allows you to resize, convert file format (jpg to png for example), blur, crop, annotate, apply gamma correction and much more.
Explore more of mogrify options here.