Sunday, September 16, 2007

Batch Image Convert on SuSE10.2

I'm back from vacation and continue to write this blog.

As I wrote before I publish things here only I checked myself on real system.
Recently I had such task like convert 200 TIFF photos scanned by old fellow in JPG format :-(

Do it by hands? Nooo... Lets ask computer ;-)

Thanks god there is a Linux and ImageMagick program. This software includes mogrify which allows to scale and convert image files in batch mode from the command line. It provides a huge number of options but we only need a few examples to start use 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

Long live Linux :-)

No comments: