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
Demof 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.
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):
- test1, 3 frames, each
with DISPOSE_NONE
- test2, 3 frames,
each with DISPOSE_BACKGROUND
- test3, 3 frames:
frames 0 and 2 with DISPOSE_NONE, frame 1 with DISPOSE_PREVIOUS
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
Tutorial
I wrote a tutorial on using the
patched libpng to work with animated images. It's very example based
and expects you to know the APNG spec, but still I hope you'll find it
usefull.
Notes
Todo
Applications that work with APNGs