A nice feature of APNG (and GIF) versus the more modern CSS/SVG animations is the CPU efficiency. It's really easy to accidentally waste a ton of battery life by adding a tiny spinning gear to a page.
It varies depending on the browser and whether the GPU is used for compositing, but it's much easier to optimize blitting a rectangle each frame versus blitting a rotation of some complex vector shape on top of the page.
Animated GIFs often burn huge amounts of CPU on my machine. A page full of GIFs can bring a modern computer to its knees. (This is one reason many image sharing sites convert uploated GIFs to proper video files, mp4 or webm or whatever.)
I’ve never quite understood why implementations of GIF viewers in web browsers were so bad. In many cases it seems like they could cache every frame in GPU memory somewhere and very cheaply loop them. Caveat: I haven’t studied this in any detail, and am not an expert on image/video formats.
This is true, if you animate CSS properties that trigger reflows you can seriously harm battery usage.
I try to stick to only animating the transform property, which should perform better than a raster format, since it doesn't require any new data per frame
In case anybody is wondering how to roll out server-side support for this with a fallback to GIF: they've added "image/apng" to the Accept header for image requests. It's now "image/webp,image/apng,image/,/*;q=0.8". Sites like Imgur could start serving APNG images today.
> Sites like Imgur could start serving APNG images today
I think there'd be a problem when customers copy/paste an image from the site into another application that doesn't support APNG. Seems like a common use-case that would cause a lot of customer confusion.
APNG started in 2004, I am not sure why it took so long, 13 years before it is landed in Webkit and Blink / Chromium.
The fight with MNG only lasted few years. PNG rejected the APNG proposal multiple times ( Why ? )
This is 2017, and when we look forward to 2020, we still dont have anything to replace gif, jpeg, apng, png. With Video we went from MPEG-1, MPEG-2, MPEG-4 ( Divx, Xvid, Rmvb, WMV, VP8 era ) H.264/AV to H.265/HEVC. Our Screen went from Low Res to 4K.
Surely all these browser Vendor can sit down and at least talk about this. How about supporting bpg for a start?
And lastly, I was naively thinking having APNG now would means x years before it is roll out to large number of consumers. But to my surprise even Chrome has a very high usage in China, 60% and growing. China is historically a region of IE6, I remember IE was still 40 - 50% in 2013 or 2014. You could now start to use APNG and soon have 60%+ of your users seeing it. Amazing.
> PNG rejected the APNG proposal multiple times ( Why ? )
Because it is not a still image, and therefore should have a different file signature, MIME type, and file name extension. It is simply out of scope for PNG. When designing PNG as a replacement for GIF, they very deliberately and decidedly dropped the animation feature. Implementing APNG as an extension of PNG confuses categories that should not be confused.
> This is 2017, and when we look forward to 2020, we still dont have anything to replace gif, jpeg, apng, png.
> How about supporting bpg for a start?
There’s FLIF ( http://flif.info/ ) with very promising compression results when compared against WebP, BPG, PNG and lossless JPEG. It also supports animations, which I linked to elsewhere in this thread. Seems like the format is also nearly complete.
It is said that the MNG decoder uses a few hundred kilobytes of code whereas APNG reuses more code from the PNG library. APNG is sort of a hack where the first frame is a normal PNG and subsequent frames are hidden in custom chunks.
When testing APNG for a local project last year which involved only Firefox, I was trying to save some space and have better color support using APNG.
I found it to be quite buggy, slow, and even occasionally leading to crashes. I switched to webp. APNG was never given enough love, despite being a very useful format.
Hard to find any. It's a primitive format ignoring 20 years of video compression research. It tries to be replacement for GIF by repeating its mistakes: it has very basic inter-frame compression, lacks motion vectors, doesn't guarantee keyframes, RGB-only, and frame decoding isn't parallelizable.
In 8-bit mode it supports even fewer colors than GIF (GIF can combine frames to achieve thousands of colors), and in 24-bit mode it's larger than GIF.
For full-motion video it requires 10x-15x more data than VP9 to be decompressed by the CPU, and there's no hardware acceleration.
There's false dichotomy between "animations" and "videos", mostly due to historical reasons and that older codecs (and AWebP) used 4:2:0 subsampling which made them blurry. VP9 supports alpha, 4:4:4 mode, and it's cheaper to decode (it's more complex, but using 10x less data offsets that), so it'd be best to forget that GIF and APNG ever existed.
It's much like PNG vs JPEG. Like JPEG, the most common video codecs all use compression based on the discrete cosine transform (DCT). This makes them well suited for most video content which has a lot of continuous tones. APNG is better suited for simple animations with lots of flat shading, where video codecs would generate ugly artifacts. A classic example where APNG would be preferred is the ubiquitous throbber animation used by various applications to indicate that they are busy with some task.
APNG is great, but animated FLIFs[1] would be even better. Looks like many of their former todos have been completed, and from the remaining ones, only three are related to the file format per se. Hopefully these, too, get completed in time. Although, seems like getting support for new file formats in browsers takes time...
Fucking finally! I've been following this bug for at least 5 years. 5 years ago, when it was first proposed, this could have been a big deal. Not sure these days.. but I sure would love to see GIFs disappear..
The gif animations are really video. They play in IMG tags; they are silent and do not have video controls. Put them in VIDEO tags and they ought to get video controls.
Putting a proper video format in an IMG tag should work like an animated gif does: silent, without video controls.
A plain image is a 1-frame video. It should work in a VIDEO tag, just to keep things consistent and orthogonal and all. A 1-frame video is an image; it should work with an IMG tag.
Yes. Each frame can specify a region of the overall image, usually just the bounding box of the changed pixels. There are a few options for retention:
APNG_DISPOSE_OP_NONE: no disposal is done on this frame before rendering the next; the contents of the output buffer are left as is.
APNG_DISPOSE_OP_BACKGROUND: the frame's region of the output buffer is to be cleared to fully transparent black before rendering the next frame.
APNG_DISPOSE_OP_PREVIOUS: the frame's region of the output buffer is to be reverted to the previous contents before rendering the next frame.
[+] [-] Scaevolus|9 years ago|reply
A nice feature of APNG (and GIF) versus the more modern CSS/SVG animations is the CPU efficiency. It's really easy to accidentally waste a ton of battery life by adding a tiny spinning gear to a page.
It varies depending on the browser and whether the GPU is used for compositing, but it's much easier to optimize blitting a rectangle each frame versus blitting a rotation of some complex vector shape on top of the page.
[+] [-] jacobolus|9 years ago|reply
I’ve never quite understood why implementations of GIF viewers in web browsers were so bad. In many cases it seems like they could cache every frame in GPU memory somewhere and very cheaply loop them. Caveat: I haven’t studied this in any detail, and am not an expert on image/video formats.
[+] [-] nwah1|9 years ago|reply
[+] [-] erikpukinskis|9 years ago|reply
I try to stick to only animating the transform property, which should perform better than a raster format, since it doesn't require any new data per frame
[+] [-] pjscott|9 years ago|reply
[+] [-] MichaelApproved|9 years ago|reply
I think there'd be a problem when customers copy/paste an image from the site into another application that doesn't support APNG. Seems like a common use-case that would cause a lot of customer confusion.
[+] [-] Sephr|9 years ago|reply
[+] [-] ksec|9 years ago|reply
This is 2017, and when we look forward to 2020, we still dont have anything to replace gif, jpeg, apng, png. With Video we went from MPEG-1, MPEG-2, MPEG-4 ( Divx, Xvid, Rmvb, WMV, VP8 era ) H.264/AV to H.265/HEVC. Our Screen went from Low Res to 4K.
Surely all these browser Vendor can sit down and at least talk about this. How about supporting bpg for a start?
And lastly, I was naively thinking having APNG now would means x years before it is roll out to large number of consumers. But to my surprise even Chrome has a very high usage in China, 60% and growing. China is historically a region of IE6, I remember IE was still 40 - 50% in 2013 or 2014. You could now start to use APNG and soon have 60%+ of your users seeing it. Amazing.
[+] [-] gpvos|9 years ago|reply
Because it is not a still image, and therefore should have a different file signature, MIME type, and file name extension. It is simply out of scope for PNG. When designing PNG as a replacement for GIF, they very deliberately and decidedly dropped the animation feature. Implementing APNG as an extension of PNG confuses categories that should not be confused.
[+] [-] mdf|9 years ago|reply
> How about supporting bpg for a start?
There’s FLIF ( http://flif.info/ ) with very promising compression results when compared against WebP, BPG, PNG and lossless JPEG. It also supports animations, which I linked to elsewhere in this thread. Seems like the format is also nearly complete.
[+] [-] EGreg|9 years ago|reply
Too bad, I can't put simple vimeo previews that work on all web browsers as a result.
[+] [-] paxcoder|9 years ago|reply
[+] [-] drdaeman|9 years ago|reply
I saw it many times that "GIFs" were used to denote what actually were small MPEG4 short clips. Made me cringe internally.
[+] [-] jeroenhd|9 years ago|reply
This is good news though; finally we can start to abandon the cruddy old GIF format and move to something more modern.
[+] [-] est|9 years ago|reply
They are quite common in cheap cams
[+] [-] caio1982|9 years ago|reply
[+] [-] nayuki|9 years ago|reply
https://en.wikipedia.org/wiki/APNG
https://en.wikipedia.org/wiki/Multiple-image_Network_Graphic...
[+] [-] mindcrime|9 years ago|reply
[+] [-] usernam|9 years ago|reply
I found it to be quite buggy, slow, and even occasionally leading to crashes. I switched to webp. APNG was never given enough love, despite being a very useful format.
[+] [-] habitue|9 years ago|reply
[+] [-] pornel|9 years ago|reply
In 8-bit mode it supports even fewer colors than GIF (GIF can combine frames to achieve thousands of colors), and in 24-bit mode it's larger than GIF.
For full-motion video it requires 10x-15x more data than VP9 to be decompressed by the CPU, and there's no hardware acceleration.
https://kornel.ski/efficient-gifs
There's false dichotomy between "animations" and "videos", mostly due to historical reasons and that older codecs (and AWebP) used 4:2:0 subsampling which made them blurry. VP9 supports alpha, 4:4:4 mode, and it's cheaper to decode (it's more complex, but using 10x less data offsets that), so it'd be best to forget that GIF and APNG ever existed.
[+] [-] mdeeks|9 years ago|reply
Gifs/apng load and play instantly* and loop. There is no play button to click. No volume button, sliders, etc.
One simple link. Instant load and play.
*assuming good bandwidth
[+] [-] magila|9 years ago|reply
[+] [-] jjuuolkkju|9 years ago|reply
[+] [-] mdf|9 years ago|reply
[1] http://flif.info/animation.html
[+] [-] Sephr|9 years ago|reply
[+] [-] londons_explore|9 years ago|reply
I would hazard a guess this is getting implemented now to try to make WebP look worse.
[+] [-] quasarj|9 years ago|reply
[+] [-] tropo|9 years ago|reply
The gif animations are really video. They play in IMG tags; they are silent and do not have video controls. Put them in VIDEO tags and they ought to get video controls.
Putting a proper video format in an IMG tag should work like an animated gif does: silent, without video controls.
A plain image is a 1-frame video. It should work in a VIDEO tag, just to keep things consistent and orthogonal and all. A 1-frame video is an image; it should work with an IMG tag.
[+] [-] janus24|9 years ago|reply
[+] [-] callesgg|9 years ago|reply
[+] [-] Scaevolus|9 years ago|reply
[+] [-] maxst|9 years ago|reply
[+] [-] wildpeaks|9 years ago|reply
[+] [-] samk117|9 years ago|reply
[+] [-] hogrammer|9 years ago|reply
[deleted]