Changes

Jump to: navigation, search

APNG Specification

42 bytes added, 05:49, 21 March 2007
no edit summary
20 delay_num (unsigned short) Frame delay fraction numerator
22 delay_den (unsigned short) Frame delay fraction denominator
24 render_op (byte) Type of canvas output buffer area disposal to be done after rendering this frame
The frame must be rendered within the region defined by the `width`, `height`, `x_offset` and `y_offset` from the `fcTl`, and the width and height from the `IHDR` chunk.
The `delay_num` and `delay_den` parameters together specify a fraction indicating the delay after the current frame, in seconds. If the denominator is 0, it is to be treated as if it were 100 (that is, delay_num then specifies 1/100ths of a second). If the the value of the numerator is 0 the decoder should render the next frame as quickly as possible, though viewers may impose a reasonable lower bound on the delay.
The `render_op` parameter contains flags describing how the frame is to be disposed before rendering the next frame; it also specifies whether the frame is to be alpha blended into the current canvas output buffer content, or whether it should completely replace its region in the canvasoutput buffer. Valid render_op flags are:
bit
4 2 APNG_RENDER_OP_DISPOSE_PREVIOUS
* `APNG_RENDER_OP_DISPOSE_NONE`: no disposal is done on this frame before rendering the next; its contents are left on the canvasoutput buffer. This is the default.
* `APNG_RENDER_OP_DISPOSE_BACKGROUND`: the frame's region is to be cleared to the background color. If no `bKGD` chunk is specified, the result is fully transparent black (r, g, b, and a all 0).
* `APNG_RENDER_OP_DISPOSE_PREVIOUS`: the frame's region is to be reverted to the previous contents.
`APNG_RENDER_OP_BLEND_FLAG` may be added to any of the above disposal operations. If this flag is 0, all color components of the frame, including alpha, overwrite the current contents of the frame's canvas output buffer region. If the APNG_RENDER_OP_BLEND_FLAG is not 0 the frame should be composited onto the canvas output buffer based on its alpha, using a simple OVER operation as described in the "Alpha Channel Processing" section of the PNG specification [pngspec]. Note
that Variation 2 of the sample code is applicable.
48
edits

Navigation menu