Saturday, June 6, 2009

Image Format Convertor : Script

To Covert all images from one folder from one format to another format

Create file
Add following line to that file

for i in *png

echo $i
temp=$(echo $i | sed -e 's|\.png||')
convert -resize 640x200 $i $temp.gif

Save file
Chmod +x
Run File : ./

Here I have used .png and .gif. We can try with other .jpg, .jpeg, tif, ttf, bmp etc.