PeachImage
PeachImage.Formats.Png
PngPassthrough Class
Reads a PNG’s IHDR/PLTE/tRNS/iCCP/IDAT chunk data verbatim, with no pixel decode (no inflate of IDAT),
for callers that want to re-embed the original compressed pixel stream in another container — e.g. a
PDF /FlateDecode image stream, which can consume a PNG’s zlib-compressed IDAT data directly —
rather than decode it into an Image and re-encode it. The embedded ICC profile (if any)
is inflated, since iCCP’s own compressed form has no equivalent “verbatim” target container.
public static class PngPassthrough
Inheritance System.Object → PngPassthrough
| Methods | |
|---|---|
| TryRead(Stream, PngPassthroughInfo) | Attempts to read info from stream. Returns false (never throws) if the stream is not a PNG, or is structurally invalid or CRC-corrupt — matching TryLoad(Stream, Image, DecoderOptions)’s contract. Succeeds for interlaced, transparent, and animated PNGs alike; callers should check IsInterlaced, HasTrns, and IsAnimated themselves to decide whether the raw data is usable for their target format. |