ApngDecoder

Ecng.Drawing

Decodes APNG animation without discarding frames. PNG scanline decompression and CRC validation are performed by the existing managed PNG decoder. Supports full PNG color modes, frame subrectangles, SOURCE/OVER blending, NONE/BACKGROUND/PREVIOUS disposal, arbitrary delays and loop counts.

方法

Open
public static Animation Open(byte[] data)
result = ApngDecoder.Open(data)

Reads the chunks of the file - everything but the pixels - and prepares its frames for decoding.

ReadPlays
public static int ReadPlays(ReadOnlySpan<byte> data)
result = ApngDecoder.ReadPlays(data)

Reads how many times the animation plays, 0 for endlessly, off its acTL chunk.