←back to thread

A new PNG spec

(www.programmax.net)
616 points bluedel | 8 comments | | HN request time: 0.977s | source | bottom
Show context
albert_e ◴[] No.44373786[source]
So animated GIFs can be replaced by Animated PNGs with alpha blending with transparent backgrounds and lossless compression! Some nostalgia from 2000s websites can be revived and relived :)

Curious if Animated SVGs are also a thing. I remember seeing some Javascript based SVG animations (it was a animated chatbot avatar) - but not sure if there is any standard framework.

replies(10): >>44373806 #>>44373868 #>>44374146 #>>44374225 #>>44374312 #>>44374556 #>>44374786 #>>44376132 #>>44379316 #>>44385628 #
riffraff ◴[] No.44373868[source]
I was under the impression many gifs these days are actually served as soundless videos, as those basically compress better.

Can animated PNG beat av1 or whatever?

replies(6): >>44374218 #>>44374256 #>>44374550 #>>44374739 #>>44375571 #>>44385655 #
armada651 ◴[] No.44374550[source]
> Can animated PNG beat av1 or whatever?

Animated PNGs can't beat GIF nevermind video compression algorithms.

replies(2): >>44374811 #>>44374952 #
1. Aissen ◴[] No.44374952[source]
> 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

Of course I don't think it generalizes all that well…

replies(3): >>44375573 #>>44375646 #>>44380354 #
2. ◴[] No.44375573[source]
3. bmacho ◴[] No.44375646[source]
I 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

replies(3): >>44376096 #>>44383964 #>>44385690 #
4. Aissen ◴[] No.44376096[source]
I have no idea! I actually hoped someone would show a much more comprehensive and serious benchmark in response, but that has failed to materialize.
5. armada651 ◴[] No.44380354[source]
You'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.
replies(1): >>44385678 #
6. fc417fc802 ◴[] No.44383964[source]
I 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.
7. account42 ◴[] No.44385678[source]
Indexed 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).
8. account42 ◴[] No.44385690[source]
Almost like video codecs and animated images are different niches that optimize for different content.