| update: this article has been superseded by batch image convert, scale, thumbnail, JPEG(s), retain high resolution using antialias. |
ImageMagick (Linux/Windows) includes mogrify which allows us to scale and convert image files in batch mode from the command line. It provides a huge number of options but you only need a few examples to start making use of it…
Creates thumbnail images using all the jpg files in the current directory:
mogrify -compress JPEG -quality 80 +profile *.jpg
Re-size all the jpg files in the current directory:
mogrify -sample 800x1200 *.jpg
Create a PDF document using all the jpg files in the current directory:
convert *jpg allinone.pdf
Convert all tif images to jpgs:
mogrify -format jpg -quality 50 *.tif
Scale all jpgs in the current directory by 50%:
mogrify -scale 50% *.jpg
If you need further examples, just search Google!
Advertisements
Thanks for posting that! I’ve been looking around for a batch scaler from the command line, and I think I just found it. Scaled a good 100 pictures in a couple minutes… not bad!
BenjieP
You just made my day alot easier! Converted a 3 MB pdf to jpeg and then back to pdf within the 2 MB upload limit i needed it to be, with this very nice function:)
Thanks for this. I kept on trying to use the convert command to convert all my .jpg’s to .png format. It was driving me mad. The mogrify command worked, though.
I previously used a free script from the following page
http://koan.studentenweb.org/software/jpeg2pdf.html