4 ms·
> Animated PNGs can't beat GIF nevermind video compression algorithms. Not entirely true, it depends on what's being displayed, see a few simple tests specific
by Aissen 1y ago
> Animated PNGs can't beat GIF nevermind video compression algorithms.
Not entirely true, it depends on what's being displayed, see a few simple tests specifically constructed to show how much better APNG can be vs GIF and {,lossy} webp:
http://littlesvr.ca/apng/gif_apng_webp.html http://littlesvr.ca/apng/gif_apng_webp.html
Of course I don't think it generalizes all that well…
- deleted 1y ago[deleted]
- bmacho 1y agoI tried these examples on ezgif, and indeed apng manages to be smaller than webp every single time. Weird, I was under the impression that webp was almost always smaller? Is this because GIF images are already special, or apng uses better compression than png? edit: using the same ezgif webp and apng on a H.264 source, apng is suddenly 10x the size than webp. It seems apng is only better if the source is gif
- Aissen 1y agoI have no idea! I actually hoped someone would show a much more comprehensive and serious benchmark in response, but that has failed to materialize.
- fc417fc802 1y agoI would guess that apng only wins when indexed colors can be used. That guess would match what you saw using an h264 file for the source.
- account42 1y agoAlmost like video codecs and animated images are different niches that optimize for different content.
- armada651 1y agoYou're correct and I was considering adding a footnote that if you use indexed colors like a GIF then PNG can beat GIF due to better compression algorithms. But when most people think of APNG they think of lossless compression rather than lossy compression.
- account42 1y agoIndexed can be lossless when the source already uses few colors, e.g. because you want to improve the compression of an existing GIF or limit colors for stylistic choice (common in pixel art).