3 ms·
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/201
by IvanK_net 2y 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 https://sidbala.com/content/images/2016/11/outputFrame.png
94 kB: https://www.photopea.com/keynote.png https://www.photopea.com/keynote.png
- isametry 2y ago(What's happening here is a reduction of the color count: https://en.wikipedia.org/wiki/Color_quantization https://en.wikipedia.org/wiki/Color_quantization)
- SigmundA 2y agoThats not PNG being lossy, the image was preprocessed to lose information by reducing color count before being compressed with PNG.
- IvanK_net 2y agoThat 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.
- SigmundA 2y agoNo 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.