6 ms·
Besides the whole video codec debacle, APNG has many advantages for the web (which are shared with gif). Since you have transparency, you can make each frame tr
by keeperofdakeys 13y ago
Besides the whole video codec debacle, APNG has many advantages for the web (which are shared with gif). Since you have transparency, you can make each frame transparent, and lay them on top of each other; which allows more efficient temporal compression. You could also used an indexed palette, to save a lot of space (but not be limited to 256 colours per frame). Then you also get proper lossless compression, which is important for logos when scaling.
While much more efficient in the long run, a video codec loses out for short animations when you consider the above points.
- mistercow 13y ago>Since you have transparency, you can make each frame transparent, and lay them on top of each other; which allows more efficient temporal compression. There is simply no way that you are going to achieve more efficient compression with that crude technique than with the algorithms used by modern video codecs. I also think that losslessness is probably relatively low concern with an animation. The transparency thing is important, although that is achievable with video as well. WebM is apparently going to support it directly one of these days, but the cross-browser way is to store the alpha channel in a separate half of the frame and combine them using an off-screen canvas. (Edit: see this demo: http://jakearchibald.com/scratch/alphavid/ http://jakearchibald.com/scratch/alphavid/)
- malandrew 13y agoNot having audio is also an advantage since it means that "paused by default" isn't desirable by most users. I want all video on sites to never autoplay solely because of sound.
- mistercow 13y agoDo any browsers offer that option from the GUI? It seems unlikely to be common. It also seems like an easy fix for browser developers to allow you to exclude from that rule any video that has no audio track.