←back to thread

A new PNG spec

(www.programmax.net)
614 points bluedel | 4 comments | | HN request time: 0.622s | source
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 #
1. bmacho ◴[] No.44374312[source]
> Curious if Animated SVGs are also a thing.

SVG is just html5, it has full support for CSS, javascript with buttons, web workers, arbitrary fetch requests, and so on (obviously not supported by image viewers or allowed by browsers).

replies(2): >>44375596 #>>44375836 #
2. bawolff ◴[] No.44375596[source]
Browsers support all that sort of thing, as long as you use an iframe. (Technically there are sone subtle differences between that and html5, but you are right its mostly the same)

If you use an <img> tag, svgs are loaded in "restricted" mode. This disables scripting and external resources. However animation via either SMIL or CSS is still supported.

replies(1): >>44385782 #
3. vorgol ◴[] No.44375836[source]
It nearly got raw socket support back in the day: https://news.ycombinator.com/item?id=35381755
4. account42 ◴[] No.44385782[source]
And non-browser image renders support almost none of those advanced totally-still-SVG features (and I don't blame them) while they often do support animated GIFs.