Batch Lossy JPG And PNG Compression Script Using GraphicsMagick
WebUpd8 reader Bruce Ingalls has created a script for batch lossy compression of jpg and png files. The script is useful if you have a lot of images - e.g., you can run it to compress all the images used by a website, etc.
The script compresses only the files for which the resulted compressed image is detected to be smaller than the original image file. It uses GraphicsMagick which Bruce says is better for compression than ImageMagick (~1.5% smaller images with GraphicsMagick than with ImageMagick) and also faster, when compressing a large number of images.