fcTL
fcTL, or frame control chunk, is a component of the APNG (Animated Portable Network Graphics) specification. It provides per-frame metadata that tells a PNG reader how to render each animation frame. The fcTL chunk is issued for every frame in the animation and is followed by the corresponding image data chunks (IDAT for the first frame, or fdAT for subsequent frames).
The data payload of fcTL is 26 bytes and contains the following fields in order:
- sequence_number: a 4-byte unsigned integer used to order frames.
- width: the frame’s width in pixels.
- height: the frame’s height in pixels.
- x_offset: the horizontal offset of the frame within the canvas.
- y_offset: the vertical offset of the frame within the canvas.
- delay_num: a 2-byte value forming the numerator of the frame delay.
- delay_den: a 2-byte value forming the denominator of the frame delay.
- dispose_op: a 1-byte value indicating how the previous frame should be disposed after this frame is
- blend_op: a 1-byte value indicating how the frame should be blended with the existing canvas.
Interpretation of the timing and operations:
- The frame delay is delay_num/delay_den seconds.
- dispose_op options include none, background, or previous, affecting how the frame’s area is handled after display.
- blend_op options include source (replace) or over (alpha-blend over the existing image).
fcTL does not carry pixel data itself; image data for frames is supplied separately (IDAT for the