From within a Makefile I like to reduce the size of PNGs.
I tried first ImageMagick, but while I could resize (down) the images and reduce their colours to 32 (or the depth to 5 bits), the actual file size was bigger than the original in most cases.
With GraphicsMagick the results are similar, sometimes slightly better, sometimes worse.
[gm] convert input.png -trim -resize 600 -depth 5 -quality 100 output.png
With the Gimp, the results are always perfect. After down-scaling the image and reducing the colours to 32, the resulting images are always much smaller than the originals. Unfortunately, using the Gimp from a Makefile is a little bit difficult and I don't know lisp, only Python.
Questions: - Is there a way to make ImageMagick or GraphicsMagick reduce the PNG size? - Is there an easy way of performing this transformations with the Gimp instead, preferable using Python? - Are there other free tools around to help with this task?