Changes

Jump to: navigation, search

APNG Specification

27 bytes added, 10:13, 14 August 2008
m
corrected links and a typo
= Overview =
APNG is an extension of the [http://www.w3.org/TR/PNG/ PNG][pngspec] format, adding support for animated images. It is intended to be a replacement for simple animated images that have traditionally used the [http://www.w3.org/Graphics/GIF/spec-gif89a.txt GIF][gifspec] format, while adding support for 24-bit images and 8-bit transparency. APNG is a simpler alternative to MNG, providing a spec suitable for the most common usage of animated images on the Internet.
APNG is backwards-compatible with PNG; any PNG decoder should be able to ignore the APNG-specific chunks and display a single image.
The "default image" is the image described by the standard `IDAT` chunks, and is the image that is displayed by decoders that do not support APNG.
The "canvas" is the area on the output device on which the frames are to be displayed. The contents of the canvas are not necessarily available to the decoder. As per the PNG Specification, if a `bKGD` chunk exists it may be used to fill the canvas if there is no preferrable preferable background.
The "output buffer" is a pixel array with dimensions specified by the width and height parameters of the PNG `IHDR` chunk. Conceptually, each frame is constructed in the output buffer before being composited onto the canvas. The contents of the output buffer are available to the decoder. The corners of the output buffer are mapped to the corners of the canvas.
= Structure =
An APNG stream is a normal PNG stream as defined in the [http://www.w3.org/TR/PNG/ PNG Specification][pngspec], with three additional chunk types describing the animation and providing additional frame data.
To be recognized as an APNG, an `acTL` chunk must appear in the stream before any `IDAT` chunks. The `acTL` structure is described below.
= Test Encoder and Sample Images =
*Sample images are available from the APNG implementation page at http://littlesvr.ca/apng/ *An encoder (open source) is available in Mozilla versions newer than alpha 4. *An application (open source) using the Mozilla encoder to assemble APNGs available here: http://littlesvr.ca/apng/apngedit.html
= A. References =
[pngspec]: *http://www.w3.org/TR/PNG/ "Portable Network Graphics (PNG) Specification (Second Edition)" [pngext]: *http://pmt.sourceforge.net/specs/png-1.2-pdg.html "Extensions to the PNG Specification, Version 1.2.0" [gifspec]: *http://www.w3.org/Graphics/GIF/spec-gif89a.txt "Graphics Interchange Format 89a" [pngproject]: *http://www.animatedpng.com "APNG Project - official Site"
1
edit

Navigation menu