3 ms·
To nitpick, comparing with PNG is misleading, because it's comparing a lossless format with lossy. a JPEG would be around the same size has H.264.
by samlinnfer 2y ago
To nitpick, comparing with PNG is misleading, because it's comparing a lossless format with lossy. a JPEG would be around the same size has H.264.
- bigstrat2003 2y agoYeah that jumped out at me as well. It's a really unfair comparison.
- edflsafoiewq 2y agoIt's not supposed to be a "fair" comparison, it's just an observation. You already understand where the difference comes from. The article goes into some detail to explain it to a person who doesn't. The actual point of that example isn't even about lossy vs lossless anyway, it's about how 300 frames can take up nearly the space as one frame (interframe compression).
- eviks 2y agoit's not misleading, but leading - to the concept of lossy compression
- IvanK_net 2y agoLossy 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
- SigmundA 2y agoPNG is not lossy, your example uses a preprocessor to quantize colors before being compressed with PNG. PNG loss no information from the image being fed to it, the loss was done before creating a simpler image.
- IvanK_net 2y agoI know that the "lossines" is not included in PNG encoders, as it is in JPG / WEBP encoders. But the idea is the same: if you are ready to "accept some loss" (by reducing the number of colors in this case), you can get a much smaller PNG file.
- SigmundA 2y agoYou can get a smaller uncompressed bitmap by reducing color count too reducing bits per pixel, that does not mean bmp is a lossy compression scheme. Color quantization will reduce the final size of the image in nearly all image formats jpg/webp would benefit as well. You could have an artist or AI render the picture as a cartoon and png will highly compress it more than the original that does not mean PNG is a lossy compression scheme. You could take a photo with a low resolution camera and it will be smaller than a higher resolution one after PNG compression, again nothing to do with PNG. It is no surprise simpler images with less information compress better with lossless formats than more complex ones. Your example implies that the PNG format itself has a lossy mode, when instead its just the way the image is preprocessed which has no limit on techniques that can lose information to make the image smaller independent of the codec.
- IvanK_net 2y agoYou can have a PNG and JPG versoin of the original image without no loss, and the files would be about the same size. You can have a PNG and JPG version of the original image, with the same loss - "average error per pixel", and the files would be about the same size. I know there is no lossy compression described in a PNG standard. But there exist programs which produce tiny PNG files with a loss. So comparing an MP4 encoder with a bult-in loss to a PNG encoder without any built-in loss is not fair. They should have made the MP4 encoder encode the video in a lossless way, just like they did with PNG.