Optimize png images with OptiPng

OptiPng is a optimizer for png images. It can compress images to a smaller size without losing quality. The current version of OptiPng is supported for Linux and Windows.

Install optipng

# apt-get install optipng

There are 8 optimization level, from 0-7 and the default is 2. If you want to use the default optimization level, just pass the image name as a parameter:

# optipng image.png

To use an optimization level, for example level 7, use the following command:

# optipng -o7 image.png

Output IDAT size = 218980 bytes (71356 bytes decrease)
Output file size = 219037 bytes (71452 bytes = 24.60% decrease)

As you can see the png image was optimized by 24% and went from 290,489 to 219,037 bytes.

With Optipng you can also convert images from other formats like GIF, PNM, BMP and TIFF to optimized PNG and perform corrections and integrity checks. For more info visit optipng official page: http://optipng.sourceforge.net/

- Posted by Ana to Linux