PeachImage

PeachImage.Formats.Gif

GifPassthrough Class

Reads a GIF’s first frame’s LZW-compressed image data verbatim, with no LZW decompress, for callers that want to re-embed the original compressed pixel stream in another container — e.g. a PDF /LZWDecode image stream — rather than decode it into an Image and re-encode it. Only the first frame is read (mirroring PeachImage.Formats.Gif.GifDecoder.Decode(System.IO.Stream,PeachImage.DecoderOptions)’s “decode just the first frame” semantics); see IsAnimated.

public static class GifPassthrough

Inheritance System.Object → GifPassthrough

Methods  
TryRead(Stream, GifPassthroughInfo) Attempts to read info from stream. Returns false (never throws) if the stream is not a GIF, or is structurally invalid, or has no image frames — matching TryLoad(Stream, Image, DecoderOptions)’s contract. Succeeds for interlaced and animated GIFs alike; callers should check Interlaced and MinCodeSize themselves to decide whether the raw data is usable for their target format (see those members’ doc comments for the specific compatibility conditions).