Changes

Jump to: navigation, search

APNG Specification

111 bytes removed, 18:56, 29 March 2007
iterations->plays
To be recognized as an APNG, an `acTL` chunk must appear in the stream before any `IDAT` chunks. The `acTL` structure is described in the next section.
The default image may be included as the first frame of the animation by the presence of a single `fcTL` chunk before `IDAT`. Otherwise, the default image is not part of the animation, and the output buffer must be completely initialized to fully transparent black rectangle, with width and height dimensions from the `IHDR` chunk, at the beginning of each iterationplay.
Subsequent frames are encoded in `fdAT` chunks containing almost the same structure of content as `IDAT` chunks. Information for each frame about placement and rendering is stored in `fcTL` chunks. The full layout of `fdAT` and `fcTL` chunks is described below.
The boundaries of the entire animation are specified by the width and height parameters of the PNG `IHDR` chunk, regardless of whether the default image is part of the animation. The default image should be appropriately padded with fully transparent pixels if extra space will be needed for later frames.
Each frame is identical for each iterationplay, therefore it is safe for applications to cache the frames.
== Chunk Sequence Numbers ==
byte
0 num_frames (unsigned int) Number of frames
4 num_iterations num_plays (unsigned int) Number of times to loop this APNG. 0 indicates infinite looping.
`num_frames` indicates the total number of frames in the animation. This must equal the number of `fcTL` chunks. 0 is not a valid value. 1 is a valid value for a single-frame APNG. If this value does not equal the actual number of frames it should be treated as an error.
`num_iterationsnum_plays` indicates the number of iterations times that this animation should play; if it is 0, the animation should play indefinitely. If nonzero, the animation should come to rest on the final frame at the end of the last iteration. The number of iterations includes the first time the sequence is displayedplay.
== `fcTL`: The Frame Control Chunk ==
* The `width` and `height` fields must equal the corresponding fields from the `IHDR` chunk.
As noted earlier, if a `fcTL` chunk does not precede `IDAT`, the default image is not part of the animation, and the output buffer must be completely initialized to fully transparent black at the beginning of each iterationplay.
Together these requirements serve to ensure that each iteration play of the animation will be identical.
== `fdAT`: The Frame Data Chunk ==
48
edits

Navigation menu