← Back to context

Comment by samlinnfer

2 years 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.

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

94 kB: https://www.photopea.com/keynote.png

  • PNG 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.

    • I 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.

      2 replies →

Yeah that jumped out at me as well. It's a really unfair comparison.

  • It'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).