Sunday, June 17, 2012

Optimize PNG file size with optipng

optipng is an advanced optimization program for Portable Network Graphics (PNG). It optimizes PNG files, reducing their size without losing any information.

Install

Open a terminal window and run:

sudo apt-get install optipng -y

Optimize

optipng provides more advanced usages, but to reduce the image size, simply invoke optipng with the image name as its argument. The modification is done in place, ie, the changes are applied directly to the image without creating a backup (if you wish to keep a backup supply the -keep option). Example:

optipng image.png

References

optipng(1) - Linux man page
A guide to PNG optimization

No comments:

Post a Comment