Comment by IvanK_net
2 years ago
Lossy compression is possible in PNG to a certain degree. This is the "same PNG", but 94 kB instead of 1015 kB:
1015 kB: https://sidbala.com/content/images/2016/11/outputFrame.png
2 years ago
Lossy compression is possible in PNG to a certain degree. This is the "same PNG", but 94 kB instead of 1015 kB:
1015 kB: https://sidbala.com/content/images/2016/11/outputFrame.png
(What's happening here is a reduction of the color count: https://en.wikipedia.org/wiki/Color_quantization)
Thats not PNG being lossy, the image was preprocessed to lose information by reducing color count before being compressed with PNG.
That is what a "lossy compression" means. Instead of encoding the original image, you look for a similar image, that can be losslessly encoded into a smaller file.
In PNG, you look for an image with 100 - 200 colors (so that colors repeat more often) and losslessly encode it with DEFLATE.
In JPG, you look for an image with with a reduced description through DCT, and losslessly encode it with Huffmann trees.
No thats image preprocessing to lose information before compression. JPG would be smaller if color count was reduced as well.
If color quantization using a specific algorithm was part of PNG you could say its lossy compression, its not, PNG is not lossy compression by any definition. Your specific image processing pipeline might be lossy, based on various tools you ran the image through or equipment used to capture, PNG is not.