Class AnimDecoder
Decodes animated WebP images into individual frames. Uses libwebpdemux's WebPAnimDecoder internally.
public class AnimDecoder : IDisposable
- Inheritance
-
AnimDecoder
- Implements
- Inherited Members
Constructors
AnimDecoder(byte[], bool)
Creates an animation decoder from WebP data.
public AnimDecoder(byte[] webpData, bool useThreads = false)
Parameters
AnimDecoder(Stream, bool)
Creates an animation decoder from a stream.
public AnimDecoder(Stream stream, bool useThreads = false)
Parameters
Properties
Info
Gets information about the animation (dimensions, frame count, loop count).
public AnimInfo Info { get; }
Property Value
Methods
DecodeAllFrames()
Decodes all frames and returns them as a list. Each frame's Pixels array contains BGRA data for the full canvas.
public List<AnimFrame> DecodeAllFrames()
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
GetNextFrame()
Gets the next decoded frame, or null if no more frames. The returned pixel data is BGRA for the full canvas.
public AnimFrame? GetNextFrame()
Returns
HasMoreFrames()
Checks if there are more frames to decode.
public bool HasMoreFrames()
Returns
Reset()
Resets the decoder to the first frame.
public void Reset()