PNG optimization guide

    4 tips for optimizing PNG images for Gimp users. It will be useful for beginner typesetters.

    As a result of experiments with Gimp 2.6 and PNG images, I managed to find out the following interesting facts:
    1. If you are preparing a sprite image (for CSS-layout), it is better to arrange the image elements in a horizontal line. This will reduce the file size in some cases by almost half!
    2. Before saving, it is useful to put the image in indexed mode (Image -> Mode -> Indexed).
    3. When saving an image, it is better to uncheck Interlacing (Adam7).
    The result will be a very compact file. However, it can still be squeezed.

    4. Additional compression is possible with OptiPNG andAdvanceCOMP .
    For Ubuntu users , these two compressors can be installed as follows: or via Synaptic. For FreeBSD (thanks to iZENfire ): OptiPNG: install from port: cd / usr / ports / graphics / optipng / && make install clean or install from package: pkg_add -r optipng AdvanceCOMP: install from port: cd / usr / ports / archivers / advancecomp / && make install clean or install from the package: pkg_add -r advancecomp For all other Google to help. For the results of Photoshop, these two programs will also be very useful.
    sudo apt-get install optipng
    sudo apt-get install advancecomp



















    After installing OptiPNG and AdvanceCOMP, you can use them like this:
    optipng -o7 (sometimes compresses almost twice)
    and then
    advpng -z4 .png (throws from 5 to 1%)
    For example:
    optipng -o7 myimagefile.png
    advpng -z4 myimagefile.png

    Also popular now: