APNG comes as a modification of the well-known PNG format, but with additional support for animation. It supports 24-bit images and 8-bit transparency, having a much better quality then the classic GIF format.
An APNG file contains ordinary PNG frames, with two additional data chunks: aDAT (animation data chunks) and fCTL(the frame control chunk). Any PNG decoder should be able to decode the first frame of the APNG file as an ordinary PNG image. Any APNG data file must be subjected to certain rules:
The size of the entire APNG
"APNG is designed to allow incremental display of frames before the entire image has been read. This implies that some errors may not be detected until partway through the animation. It is strongly recommended that when any error is encountered decoders should discard all subsequent frames, stop the animation, and revert to displaying the default image. A decoder which detects an error before the animation has started should display the default image. An error message may be displayed to the user if appropriate.
Structure
An APNG stream is a normal
APNG is an extension of the PNG format, adding support for animated images. It is intended to be a replacement for simple animated images that have traditionally used the GIF 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 decode the first frame of an APNG and treat it as a normal single-frame PNG.
PNG Structure
An APNG stream is a