Blog

Back

14/12/2013

PNG Compression

I use Luminance HDR for assembling HDRs. It works great, and I usually use PNG format to export the LDR image files.

Problem is, the PNGs created by Luminance are big.

I can load one in GIMP and save it again in PNG, and the file goes down from 60MB to 20MB. Quite a lot.

The thing is, can I compress all the PNGs in a folder at once ? The answer is “optipng”. Install it in your Linux system, and then, in a terminal, go to the folder that contains them and do this:

for i in *.png; do optipng -quiet -preserve -log optipng.log “$i”; done

This will compress all the PNG files. If you have time, try:

for i in *.png; do optipng -o7 -quiet -preserve -log optipng.log “$i”; done

(note the -o7) It will take a lot more time, but the compression will be better.


© 2017 Esteve Boix | Powered by PmWiki | Original skin Barthelme theme by Scott and ported by Chi Shang.