PeachImage
PeachImage.ImageInfo
ImageInfo(int, int, PixelFormat, string, bool, bool, bool, bool, bool) Constructor
Lightweight image dimensions/format info obtainable without decoding full pixel data.
public ImageInfo(int Width, int Height, PeachImage.PixelFormat PixelFormat, string FormatName, bool IsAnimated=false, bool HasAlpha=false, bool IsAdobeInvertedCmyk=false, bool IsYcck=false, bool IsLosslessEncoding=false);
Parameters
Width System.Int32
The image width in pixels.
Height System.Int32
The image height in pixels.
PixelFormat PixelFormat
The pixel format a full decode would produce.
FormatName System.String
The name of the format that produced this info, e.g. "jpeg".
IsAnimated System.Boolean
Whether the source is a multi-frame animation. For an animated source, Load(Stream, DecoderOptions) would decode only its first frame (see IsAnimated) — use AnimatedImage to decode every frame.
HasAlpha System.Boolean
Whether the source actually carries an alpha channel — see HasAlpha.
IsAdobeInvertedCmyk System.Boolean
JPEG/Adobe-specific: whether a direct-CMYK source stores its samples in Adobe’s inverted convention
(255-x). Always false for non-JPEG formats and non-CMYK JPEGs. Relevant to
KeepAdobeCmykInverted — by default, a full decode de-inverts
these bytes back to the standard CMYK convention regardless of this flag.
IsYcck System.Boolean
JPEG/Adobe-specific: whether a 4-component source is really YCCK under the hood (Adobe APP14 transform=2) rather than direct CMYK. Always false for non-JPEG formats and non-YCCK JPEGs. Relevant to DecodeRawYcck — by default, a full decode converts YCCK to CMYK regardless of this flag.
IsLosslessEncoding System.Boolean
Whether the source’s pixel data was encoded losslessly by its original codec, so a caller can avoid silently re-encoding an already-lossy source under a full-fidelity assumption. Semantics are format-specific:
- WebP: true for a VP8L (lossless) bitstream, false for VP8
(lossy). Always false for an animated WebP — lossy/lossless is genuinely a
per-frame (
ANMF) property there, so a single file-level answer isn’t well-defined. - AVIF: true only when every AV1 tile’s frame header reports the coded stream as fully lossless (identity-transform, qindex/delta-q all zero, and no superres upscaling) — AND’d across every tile of a HEIF grid composite. A malformed AV1 tile bitstream degrades this to false rather than throwing, matching Identify(Stream)’s “header-level info only” leniency elsewhere.
- TIFF: true when the Compression tag is 1 (none), 5 (LZW), or 32773 (PackBits) — this decoder’s entire supported compression set, which is lossless by construction, so this is always true for any TIFF that decodes successfully today.
- Always false for every other format, including JPEG (always lossy) and PNG/BMP/GIF (not format-specific here since they have no lossy mode at all — see the general opaque-source handling elsewhere rather than this flag).