This website is no longer kept up to date, please see http://animatedpng.com/ for most up to date APNG information.

APNG Implementation

I will keep this page updated to report on my progress implementing the APNG specification as changes to libpng. If you have any ideas, suggestions, complaints or whatever else to share, send me an email.

Demo

Demo of of the obvious advantages of APNG over GIF: click.

History

My understanding of how this project started is hearsay so don't take it as true for granted (in fact if you know better, send me feedback).

In about 2004 Vladimir Vukicevic and Stuart Parmenter (both of the Mozilla foundation) started working on an animated version of the PNG format. PNGs are superior to GIFs in several important ways but unfortunately support no animation.

MNG already existed at that time but was too big/fancy for most people to accept as an image format (this is the first and last time I mentioned this flamy topic).

Out of discussions on the PNG mailing list, bugzilla.mozilla.org and lots of other feedback a preliminary spec for APNG was born and revised four times.

Then Vlad and Stuart had no time available for APNG so it was left as a todo for a later time (2 years it turns out).

In the spring of 2006 David Humphrey of Seneca College arranged for me (Andrew Smith) to meet with Vlad and work on APNG as a Google Summer of Code project, to inplement the APNG spec into libpng. This was completed successfully for libpng-1.2.10.

In the fall of 2006 I updated the patch to work with libpng-1.2.12 and integrated it into the Mozilla tree. The patch is awaiting aproval (see bug 257197).

In Winter 2007 I turned the spec and the patch inside out more then once to accomodate everybody. Still awaiting approval.

20 March 2007: the patch got into the mozilla trunk, happy day!

21 May 2008: After maintaining the patch for a year I've decided to move on to other things. Hopefully someone else will continue to update it for new versions of libpng.

25 September 2010: I should have mentioned this here a long time ago. As you can see from the list of patches below Max Stepin has been very kindly maintaining the patch for pretty much the last two years. Say thanks to him if you're using APNG outside of Firefox!

5 Feb 2011: Also, the Animated PNG website has been maintained by Max for a while. That website (originally created by Brendan Sera-Shirar and his students at Seneca) is a much nicer version of this one :)

Patches

Using the older patches is not recommended for the same reason that using the old libpngs is not recommended, but all the patches that I still have are here in case you really want them.

Sample images for APNG 0.10

These are mostly usefull for testing the library, not as good for testing an application, but they are animated:

dispose_op tests (each test with the APNG_BLEND_OP_SOURCE blend_op):
blend_op tests (each test with the APNG_DISPOSE_OP_NONE dispose_op):
Palleted, 2 frames: toucan-pallete-2frame.png
24-bit rgb, 3 frames: lion-rgb-3frame.png
Greyscale, 3 frames: lion-greyscale-3frame.png

And of course there is a fancy animation here too: stickmen background test (first frame with SKIP_FRAME and a tIME in between an fcTl and an fdAt, to make sure it doesn't break).

Also there are more demos on Justin Dolske Animated PNG demos page.

And more samples gathered and assembled by Max Stepin: on Photobucket

Documtentation

Notes

Todo

Applications that work with APNGs