I use this program quite a bit, and thought I'd post it as it has a lot of functionality contained in the one small program. e.g to convert a .gif to a .png is as simple as:sam2p is a UNIX command line utility written in ANSI C++ that converts many raster (bitmap) image formats into Adobe PostScript or PDF files and several other formats. The images are not vectorized. sam2p gives full control to the user to specify standards-compliance, compression, and bit depths. In some cases sam2p can compress an image 100 times smaller than the PostScript output of many other common image converters. sam2p provides ZIP, RLE and LZW (de)compression filters even on Level1 devices.
Code: Select all
sam2p xxx.gif xxx.png
Code: Select all
#!/bin/bash
directory=`pwd`
for file in $directory/*.gif
do
filename=${file%.gif}
sam2p $filename.gif $filename.png
done