Shell Scipt to convert a bunch of images using ‘convert’
convert is a command line tool available with ImageMagick which can be used to convert between image formats. This shell script uses it to convert a bunch of images from ‘.ps’ to ‘.png’. Follow embedded instructions to customize it to your needs.
# Uses the 'convert' utility to convert a bunch of images from one
#format to another
# the script should reside in the same directory as the images
# You need to have 'ImageMagick' installed
# By Amit K.Saha
# Help taken from http://howtoforge.com/forums/showthread.php?t=4493
#to convert to/from different formats
# change 'ext' to reflect the format you want to convert "from"
# Chnage target to the format you want to convert to
for i in *.ps
base=$(basename $i $ext) #to extract only the filename and NOT the extension
convert $i $base.$target