Product Version :
URLs (if applicable) : <see below>
Other browsers tested: Opera 9.52 OK
Add OK or FAIL after other browsers where you have tested this issue:
Safari 3: FAIL
Firefox 3: OK
IE 7: FAIL
http://en.wikipedia.org/wiki/APNG
and
https://wiki.mozilla.org/APNG_Specification
and
http://animatedpng.com/What steps will reproduce the problem?
1. View an APNG file
2.3.What is the expected result?
All frames of animation are shown.
What happens instead?
Only the first frame is shown.
Please provide any additional information below. Attach a screenshot if
possible.
I am just creating this as a request to add this feature to WebKit and Chrome.

Having something to fill the gap between static images (PNG) and interative animation
(Flash) that isn't GIF would be a great step forward for the web. With APNG available
in Firefox and Safari 9.5+ I believe it is important that Chrome and the other Safari
browsers catch up.
From looking at a similar RFE in the webkit tracker, it seems libpng may be the
bottle neck in getting this feature implemented. There are patches to libpng for APNG
but they are not being patched into libpng trunk as far as I can tell.
http://littlesvr.ca/apng/ - Andrew Smith's APNG patches for libpng (now out of date)
http://tinyurl.com/q3pqwx - RFE on the libpng tracker.
https://bugs.webkit.org/show_bug.cgi?id=17022 - RFE on webkit bugzilla

I hacked in APNG support to the skia version of PNGImageDecoder. I am attaching a
rough patch but there are a few pieces missing.
The build system handles linking with bundled versions of third-party libraries, but
didn't seem to be picking up the patched header. My patch bundles the required
defines.
This patch relies on patching the bundled version of libpng to support APNG. The
versions of the patches in Mozilla's Bugzilla are stale WRT the current libpng
releases. Re-based versions of the patch are available here:
http://hp.vector.co.jp/authors/VA013651/freeSoftware/apng.html
I understand this would need to be upstreamed first since the unforking, but these
changes should also be ported to the generic pre-skia version of PNGImageDecoder.
Since Webkit no longer bundles libpng, and since Webkit on Mac uses Cg/ImageIO
instead of libpng, implementing this is trickier.
Finally, this patch doesn't do any conditional building. Need input on this.

If APNG support landing in libpng is a prerequisite, then this functionally becomes a wont_fix. To quote the
APNG proposal vote:
http://sourceforge.net/mailarchive/message.php?msg_name=3.0.6.32.20070420132821.012dd8e8%40mail.comcast.net
>> Voting has closed on the APNG proposal. There were 8 YES
>> votes, 10 NO votes, no abstentions, and no ineligble votes
>> cast. The proposal has failed and the APNG chunks are not
>> registered.
>
>It's unfortunate that full acceptance of the proposed usage of the
>chunks is required to register public chunks that may/will be used by
>multiple vendors. I haven't looked at many other similar standards, but
>I believe that for TIFF, all that's needed is a form submitted to Adobe.
> Combined with the requirement that there basically be twice as many
>YES votes as NO votes, this makes it unlikely that APNG will ever be
>accepted in any form by this group as long as some of APNG's original
>core goals are not violated -- or, worse yet, the APNG chunk names will
>not be able to be reserved for usage by multiple vendors, regardless of
>their purpose...
>
>There are pretty serious disagreements regarding: a) the use of the PNG
>signature; b) the fallback image type (single-image vs. montage); c) the
>definition of a "good" fallback image (the data loss issue); d) various
>feature additions/omissions (JNG/JPEG support, sprites, etc.). The
>first of these, the PNG signature issue, seems to be the most
>intractable issue.
>

> But that's exactly the point of this request: to switch Webkit/Chrome from vanilla
libpng to apng-patched libpng.
Originally, I thought that doing this would require a lot of work/maintenance for the
Webkit team as they would have to fork and maintain a new library. However, after
some inspection, it seems the libpng library itself has reached a level of maturity
such that it it not changing much at all anymore. In theory, this should make
maintaining a fork of this particular library very easy.
Additionally, it seems as though the reason the libpng team decided against adopting
the patch into their mainline by a vote of 8 to 10, was a matter of maintaining a
"purity" of the standard for the image file format. So, I guess the real question for
the webkit guys here, is whether or not apng support would dillute the image format
or not. We already know the Mozilla guys don't think so :)

> So, I guess the real question for
the webkit guys here, is whether or not apng support would dillute the image format
or not. We already know the Mozilla guys don't think so :)
I agree with them. It wouldn't affect any existing PNG files. It would just make the ones that are APNG work.
My biggest reason for wanting APNG is the 8-bit alpha. You can produce some pretty neat throbbers with that.
With GIF, to make a really cool-looking throbber, you need to have a consistent background color for your
page. I've even seen a few pages that have a background image, a nice glossy transparent design (using PNGs,
CSS, and whatnot), and then have a big white slab just to put the GIF throbber on :D

Funny how some of these bug reports turn into petitions....
Any chromium developers able to ring in on this, so we can get a definitive answer for whether to continue
hoping for this or give up hope completely?

I'm using APNGs in my web-apps. They work fine with Firefox, it was very
disappointing to note that my web-apps stopped working properly in Chrome for this
missing feature.
I cannot use GIFs since they do not work correctly with transparencies and i
certainly won't use that crap of Flash.
This means that i have to push my users the use Firefox instead of Chrome and it is
not something i like to do since i do believe that Chrome would make my web-apps
faster and more responsive.
I hope the Chrome team will reconsider their position on APNGs and, in this way, let
us developers get rid of those old, ugly GIFs that have haunted the WEB with their
dumb limits from its beginning.

I wouldn't call APNG widely used. Only places I've seen it used are in examples of APNG usage. There is a need for post-GIF animating image support, and APNG may probably a good choice since Firefox already implements it.
On the other hand, there are no tools that I'm aware of that can produce APNG files, other than a Firefox-based editor which is hard to use. That's probably the bigger barrier here, actually.

Correction: The last time I checked, which granted was a while ago, I could not find any good APNG generating tools that I liked. My favorite image editing tools (GIMP mainly, Irfanview too but it really needs proper alpha channel support first) have no support for APNG (again, last I checked, I should check again I suppose).

@megazzt
There's the APNG assembler. It works really well, and it's not too much of a pain. http://animatedpng.com/index.php/assembler/
Plus, if more browsers support it, it will surely get into image editors quite quickly.

APNG isn't a good format as it's impossible to differentiate between normal png and animated png without opening it and probing its headers. This causes unnecessary headache for web developers and is one of the reasons why the PNG group officially rejected this format. Which is why APNG is widely consideren non-standard as only Firefox supports it.

So since APNG is rejected by libpng and therefore (unofficially) by
Chrome/Safari, I'm interested in knowing if there is an alternative file
format to the APNG that has more chance of getting support across all
browsers?

SVG+SMIL is significantly more complex, both in terms of constructing images of that type and the implementation to render them. All that is really required here is a simple file format for animated alpha transparent bitmaps. APNG fits that requirement very nicely with a minimal amount of fuss. From what I could tell, APNG was rejected by the libpng guys mostly for political reasons, they are still pushing their MNG format(s) despite complete lack of interest from the wider community for over a decade.
Either someone needs to put their weight behind MNG Very Low Complexity, or APNG. As APNG already seems to have some momentum behind it, I say go with that. This does not preclude MNG later taking over, if they get their act together and show why it is superior.

If you need an animated bitmap format, there are tons of video formats to choose from. If you need an animation format that supports transparency, it is almost always for UI elements, and SVG+SMIL is the way to go. Unlike APNG, SVG+SMIL's clickable area for said UI element can be any shape (eg. to not count clicks on the transparent area) and APNG only support a rectangle (without the use of area tags).

Thanks for the information about SVG+SMIL, I didn't yet know that. It seems
like a nice alternative of doing animations, it isn't an alternative for
bitmap-animations. I would guess that doing stuff like animating fire is
very hard to do that way.
I've also been thinking of the 'alternative' by using the video-element. I
don't know how well supported that will be for mini-video's. At the moment
it is way too bloated as an alternative to apng, but it's something to keep
in mind, maybe that'll change in the future.
The 'MNG: Very Low Complexity' looks ok. It isn't as bloated as the full MNG
specification, but therefore it seems to have almost the same features as
APNG. One big difference I think is that APNG can be loaded as a still image
as if it was a PNG image. I don't know if that is an advantage or
disadvantage. There was also a discussion on this on mozilla's bugtracker:
https://bugzilla.mozilla.org/show_bug.cgi?id=257197.

If you're okay with storing a complete image for every frame, then yes, technically SVG+SMIL can make bloated animated PNG.
frozencow: Video formats are *less* bloated (in terms of file size) than APNG, even for, say, a small 60-frame animation.

You have to understand that libpng was never intended to be one and only implementation of PNG format. It's only a *reference* implementation.
PNG is quite simple, it's very easy to write your own implementation
(on top of zlib library). You would only need to read/handle those PNG chunks
you care about, and ignore all others. And if you need to read/handle
three APNG chunks, no problem, do it the same way.
Just because libpng won't support every chunk invented by a third-party, doesn't mean all third-party PNG extensions are doomed.
Remember, PNG was designed to be extendable by others. It's in the specs.

Now, about MNG.
> The 'MNG: Very Low Complexity' looks ok.
No it's not.
First, MNG-VLC still has that awful MAGN chunk. It's a useless too complex bug magnet.
Second, MNG-VLC is missing Delta-PNG, so you cannot save only the pixels that changed from the last frame. This issue is hugely important for compression.
APNG wins here.
PNG/MNG people attempted to introduce MNG 2.0 to address those problems, but they lost interest for some reason. Too bad. Now APNG has no alternatives.
You can read about their "MNG-2.0 proposal" here:
http://osdir.com/ml/graphics.png.general/2007-09/

CSS animation or transformation would be a much much better alternative to all this. The saddest thing is that the most well rounded solution at the moment between all browsers is a simple frame-by-frame animator using Javascript with gif fallback... the APNG file being a stupid 50kb while a frame-by-frame PNG equivalent only being 6kb!
Out of all potential options (APNG, MNG, SVG, JS frame-by-framing, CSS animation, etc..) a proper implementation of CSS animation would be the BEST option as it would allow so many other things other than "spinners".

Chromium developers, are you thinking that?
You are developers, Google is sponsor... We are users and web*(master|designer|architect...) and we have the control of choice.
Simply we can write website for any others rendering engine and boycott webkit.
Sounds like to you (developer, Google and Apple)? ;)
Remember Microsoft Internet Explorer war...

Are those better options? Well, maybe to a certain extent. There is a certain ease of use, and simplicity in being able to use an animation. That's why GIF images have remained in use for so long. I would love to be able to add some subtle effects to my web pages with what APNG can provide. Years ago, I would have pushed for MNG support, and if Chrome chose that path, I would still approve. MNG is a well document, powerful, and open format; but the complexity comes at a cost of ease in implementation. Hence, the development of APNG.
A better question than "are there better alternatives" is "why not?". APNG was specifically developed as a format for providing an animated "GIF-like" image without the limitations of binary transparency and 255 colors. Despite being an "unofficial" extension to PNG, the very simplicity and practicality of the format have given it a great deal of momentum.
What we, as technical netizens, are requesting, is that the Chrome developers simply utilize and incorporate the patches already available in the PNG library to give us the ability to use a format with great potential. The success or failure of a format is far more reliant upon the embrace of a community, than that of a board of directors. If you don't want to tout the support of APNG is a feature of Chrome, then don't, but having it available certainly can't hurt!

> CSS animation or transformation would be a much much better alternative to all this.
In what application would you make them?
> the APNG file being a stupid 50kb while a frame-by-frame PNG equivalent only being 6kb!
This can't be. You obviously doing it wrong.

SVG files are a horrible alternative because of the complete lack of compatibility with IE6,7 & 8. CSS Transformations are slightly better in that aspect because(unlike SVG) it'll at least show the first frame. But you can't just upload an image with automatically has CSS transitions, its far easier to have a simple animated image format.
Opera and Firefox did it, I don't see why Chrome wouldn't

The problem, bmarwell, is that MNG is a complex format with almost no support. The one decent web browser that did support it for a while was Konqueror 3.5. Even the KDE developers, though, have removed MNG support due to complexity and lack of use. As long as MNG does not show up AT ALL in ANY MAJOR BROWSER it is for all intents and purposes, useless.
APNG was designed specifically so that in browsers that to not understand it, such as Internet Explorer, it will simply present the first frame as a valid PNG image. It is not an official solution, but it is a practical one. Similarly, the format is simple enough to be supported easily. Firefox and Opera, two of the major browsers DO support APNG, and the other browsers show (correctly) the first frame. This is something that web developers can work with today.
I'm all for pushing MNG support in Gecko, Webkit, Presto, and Trident (Good luck on MNG support in Trident!), but for now, APNG is simply a good clean transition, and I hope for Google to take the lead in their fork of Webkit and support it.

At the moment, I am doing JavaScript sprite based frame-by-framing that seems to work pretty well in most browsers (and offers much more flexibility). Not very practical for mobile use, but the file size difference alone is staggering (8kb instead of 50kb+ for an APNG).

mng ...
What a bad idea.
Why would any webdeveloper want to use something supported by no one end not even backward compatible ?
Apng in the other hand is a good idea, even if majors browsers doesn't support it, webdeveloper can use it because of it backward compatibility with png.
Apng is an example of why free software are great.
If the official version doesn't feet your needs you can use or develop an other one.
But some seem to forget it and stay captive of one lib because it's the "official one"
It's free software !
If chromium team want apng and libpng team don't, so be it, and go for an other lib.
"We want apng but we can't have it because we HAVE to use vanilla libpng"
... Pathetic.

What some developers don't seem to understand is that what web designers and users want is not PNG (as in PNG + MNG), but a better GIF. APNG has become somewhat a better GIF. And that's all that we need. One single format to do everything. (.mng? C'mon!)
A compact, portable, modern bitmap format with added animation, in one easy, simple container.
Has some of those developers stopped to think why GIFs are still being used?
I haven't used a GIF for static bitmaps for quite some time. Regular PNG has superseded that. GIFs are still used for animations all over the web. (Man! there's even places dedicated solely to animated GIFs!)
Small effects, little animations, emoticons, etc.
What are the alternatives?
Video?
Which format? what codec? We know what's happening with video...
Besides, not all sites accept video if you want to upload an animation.
Flash?
Ugh! Won't even mention THAT.
CSS Transforms?
Maybe in 10 years for IE...
SVG+SMIL?
Can you render that inline as any bitmap? (I really don't know)
Also, you know what the "V" stands for, right?
Maybe good to replace the Flash monstruosity, but not for a simple animated bitmap.
Don't even mention anything related to Javascript/ECMAscript. There's no way to use that outside of things you own. Not to mention script blocking utilities...
So, +1 for APNG for me. It's what a better GIF should be. MNG is DEAD. If it was CompuServe instead of the PNG folks with their "we know better than you what you need" attitude, APNG would be part of the spec (and libpng) for some time now.
GIMP developers used to be like that... and finally had to surrender to users complaints with the interface.
If Webkit browsers implement APNG, then the users will benefit greatly, and PNG will finally displace GIF as the lossless bitmap format for the web.
(Sorry for previous comment, forgot to vote, duh!)

There seems to be quite a bit of FUD about SVG+SMIL here. First off, no, a simple transparent animated loading throbber does not use that much of your CPU at 18x18px (which seems like a reasonable size for a loading throbber).
> Can you render that inline as any bitmap?
It's not a bitmap, so I'll be ignoring that part of the question. Yes, with an inline <svg>, <object data="foobar.svg">/<iframe src="foobar.svg">, and <img> in the most WebKit browsers, Opera, and Firefox 4 beta 4.
> CSS Transforms?
IE invented CSS transforms, and supports quite a bit of them (albeit as proprietary Microsoft values for the filter property).
Real video formats are almost always more appropriate for captures of video. All you have to do is do H.264 + Flash for IE and WebM+<video> for everyone else.
> Besides, not all sites accept video if you want to upload an animation.
So you're saying APNG is a great way to skimp site rules? Sites like that would usually block multi-frame GIFs too. Even 4chan explicitly blocks APNG images.
Also, SVG+SMIL works in all browsers if you give IE the svgweb handicap.
> Also, you know what the "V" stands for, right?
You've got to be kidding me. Are you trying to imply that having a scalable interface is a bad thing? The amount of processing that goes into an 18x18px SVG loading throbber is negligible.

@iSephir: :)
You are misunderstanding my message. Probably I've not made myself clear enough, sorry, as English is not my main language.
The bottom line could be something like this: use vector formats for vector images, use video formats for video sources, use bitmap formats for bitmaps images.
I love vector formats, but that's when I'm working with vectors.
I don't know why there's the impression that vectors can be used for everything. Well, no. If you're animating a vector illustration I understand the use of a vector format. But if you want to animate other things (bitmaps), maybe a raster format is best suited.
Someone needs to explain me the popularity of places like "Senor GIF", but there you have it, raster animation in GIF format, that could easily be replaced with APNG.
Also, I was talking about forums when I mentioned places that don't accept video upload. GIFs are popular in forums.
I hope I made myself clear now. Regards.

"There seems to be quite a bit of FUD about SVG+SMIL here. First off, no, a simple transparent animated loading throbber does not use that much of your CPU at 18x18px (which seems like a reasonable size for a loading throbber)."
> I'm creating an HTML5 web application. There are a number of places where animation enhances the interaction with the user (e.g. buttons with an interior icon that spins to indicate motion, progress bars etc). I realize that there are many ways to accomplish similar functionality. I would like to use APNG. The animation is fluid, transparency is taken into account, file size is reasonable. I'm not going to use Flash, Video, or animated Gifs. I am using SVG+SMIL. I am running on a dual core PC with 4 gigs of ram. When one of these SVGs loads, I notice CPU spikes. When multiple SVGs are loaded the user interface sputters.
Sure, if all you want is an 18X18 throbber, then have at it (I'm using svg for that too BTW), but for those of us that want to create dynamic content that runs smoothly and isn't relying on a 3rd party plugin like Flash ... give us APNG.

Yeah, I'm not against APNG or anything. I'm just trying to state that for simple webapps with only maybe 2 simple animations, SVG+SMIL is great. APNG definitely has its use for your site I'm assuming. It's a shame that there's no low-overhead video formats supported by browsers with an alpha channel.

Chrome actually has a PROBLEM even with the first frame of apngs. No other browser does.
It sometimes fails to display the apng at all when it is embedded in page, but displays it if they are opened in their own tab. I guess there is some heuristics detecting the .png file as invalid and it is failing! It happens especially for longer animations...

Everyone keeps spouting about video formats -- APNG is supposed to compete with GIF as an animation format, it's not for video! Also, even if it was, none of the video formats have an alpha channel.
Everyone also keeps going on about SVG -- blah, apples-to-oranges, SVG is for vectors, APNG for bitmap. No more.
Everyone also keeps saying stuff about JavaScript -- like has already been said, only on sites you own is this even possible. For posting a picture on a forum, you can't do this. Or any of the other options. You're stuck with GIF in that case.
Lastly, MNG is... well... unsupported by everything. It's dead and gone.
Go for APNG!

I use apng all the time. (with the "skip first frame" option, and in the first frame I put a "Get Firefox to view this" button) I love apng, and I fully support what gnarkol's said. Don't be so anal about it, just implant the damn thing. :P