Today, some little-known techniques for optimizing PNG images are on the agenda. Most likely, you are already using some image optimization services or the optipng, pngcrush or pngout utilities. I’ll show you what you can do to make your images even smaller. The PNG format assumes no loss in quality when saving images. But in some cases, saving usa phone numbers list with distortions (Dithering or posterization) allows you to get images that are almost the same as the original, but much smaller. 1.
Usually, reducing the number of
colors by 2-3 times is imperceptible to the eye, but leads to a decrease in image size by 20-50%. The most famous pasteurization tools are Photoshop, pngquant , pngnq and TruePNG . Choosing the right palette (for example, using only grayscale or only 256 colors) – if not already done – also allows you to significantly reduce the image size (each pixel is encoded with 1 byte instead of 3). 2. Opacity mask png_3 A little-known technique, well described by Sergey Chikuyonok . Its essence lies in the removal of color information (zeroing) from completely transparent pixels. This reduces the actual number of bytes in the IDAT chunk and allows more optimal filters to be applied. Fortunately, some PNG optimization utilities, such as TruePNG, allow you to do this automatically.
Blur (dithering) png_4 A more
interesting technique from Sergey , applicable not only to PNG images. The bottom line is to select areas of the image that can be blurred (apply dithering) while maintaining visual quality (or rather, highlight areas of the image for which blur cannot be Cameroon Phone Number List applied). This optimization technique is not a lossy technique, but the final image will be different from the original, so it is important to choose parameters that minimize quality loss (visually). Dithering allows you to enhance the compressibility of the image filters (by discarding some color information). Fine tuning saves up to 20% of the image. In the automatic version, Dithering is not yet applicable, but your favorite graphics editor will allow you to do this using masks and selective filters for a PNG image.