Class AnimFrame
Represents a single frame in an animated WebP image.
public class AnimFrame
- Inheritance
-
AnimFrame
- Inherited Members
Constructors
AnimFrame(byte[], int, int, int)
Creates a new animation frame with the given pixel data and timestamp.
public AnimFrame(byte[] pixels, int width, int height, int timestampMs)
Parameters
pixelsbyte[]Decoded BGRA pixel data for the full canvas.
widthintCanvas width in pixels.
heightintCanvas height in pixels.
timestampMsintFrame timestamp in milliseconds.
Properties
DurationMs
Duration of this frame in milliseconds (computed from next frame's timestamp). -1 if unknown (last frame).
public int DurationMs { get; }
Property Value
Height
Canvas height in pixels.
public int Height { get; }
Property Value
Pixels
The decoded pixel data for this frame (BGRA by default). This is a full-canvas composite — alpha-blended with previous frames.
public byte[] Pixels { get; }
Property Value
- byte[]
TimestampMs
Timestamp in milliseconds for when this frame should be displayed.
public int TimestampMs { get; }
Property Value
Width
Canvas width in pixels.
public int Width { get; }