
Moreover, choice of filtering depends upon png bit depths, so you would have to look up and understand PNG compression from various documentation available online regarding PNG compression. But if the image is already optimized enough, this won't provide significant file sizes reduction. This can be done easily using " optipng".

This can give you some file size savings. The PNG files added will appear on the interface with file details and a thumbnail image. If opacity of PNG is fully opaque, you can strip alpha channel as it Edit Quality and Size to Compress PNG Images.There will always be a trade-off between reducing colors and quality you wish to pick.Īpart from that, there can also be other methods that you can use: You will have to figure out bit depth in your color channels and reduce them. Also, comment regarding reducing colors is true.īut apart from this, the important thing to know is that "there is no ideal command". This avoids adding noise to areas which have high visual quality without dithering.As pointed out by in comments, your image may already be optimized. When remapping, error diffusion is applied only to areas where several neighboring pixels quantize to the same value, and which are not edges. Pngquant works in premultiplied alpha color space to give less weight to transparent colors. To improve color further, histogram is adjusted in a process similar to gradient descent (Median Cut is repeated many times with more weight on poorly represented colors).įinally, colors are corrected using Voronoi iteration (K-means), which guarantees locally optimal palette. Histogram is built with addition of a basic perception model, which gives less weight to noisy areas of the image. Instead of splitting boxes with largest volume or number of colors, boxes are selected to minimize variance from their median value. Pngquant uses modified version of Median Cut quantization algorithm and additional techniques to mitigate deficiencies of Median Cut. PNGQuant Algorithmĭetails of how this algorithm works have been copied below for convenience but can be found towards the bottom of the webpage for the library at

Specifically we use the pngquant quantisation library which creates efficient 8-bit PNG files with an alpha channel.

It uses a technique called “ Color quantization”, which basically means reducing the number of colours used in an image. Compressed images are fully standards-compliant and are supported by all current web browsers and operating systems. This PNG compression program can compress and optimize large PNG images, reduce the file size and generate smaller files while maintaining image quality as.
