📜 ⬆️ ⬇️

PNG Optimization Checklist

4 tips on optimizing PNG images for Gimp users. It will be useful for beginners.

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), then the image elements are better aligned in a horizontal line. This will reduce the file size in some cases by almost half!
2. Before saving, it is useful to transfer the image into indexed mode (Image -> Mode -> Indexed).
3. When saving the image, it is better to uncheck Interlacing (Adam7).
The result will be a very compact file. However, it can still be compressed.

4. Additional compression is possible using OptiPNG and AdvanceCOMP .
For Ubuntu users, you can install these two compressors like this:
sudo apt-get install optipng
sudo apt-get install advancecomp

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 package: pkg_add -r advancecomp

For all the rest of Google to help.

For the results of Photoshop, these two programs will also be very useful.

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

Source: https://habr.com/ru/post/63528/


All Articles