PeachImage

PeachImage Namespace

Classes  
AnimatedImage An in-memory, fully-decoded (or to-be-encoded) animated image: an ordered sequence of composited AnimatedImageFrames plus loop count. Codec-agnostic, mirroring Image: Load(Stream, DecoderOptions) and Save(Stream, string, EncoderOptions) dispatch to whichever of Image’s built-in codecs also support animation (GIF today), rather than any single format’s animation API being called directly.
AnimatedImageFrame A single decoded (or to-be-encoded) frame of an AnimatedImage: a fully composited canvas plus timing/disposal metadata.
DecoderOptions Base class for format-specific decode options. Format codecs derive their own options from this (JpegDecoderOptions, PngDecoderOptions, etc.) to add format-specific knobs, but the base class itself is directly constructible: when the only thing a caller needs is TargetPixelFormat — the common case for a format-agnostic Load(Stream, DecoderOptions) call, where the stream’s actual format isn’t known up front — construct a plain new DecoderOptions { TargetPixelFormat = ... } rather than guessing at an arbitrary concrete subtype. See TargetPixelFormat for the guarantee that makes this safe.
EncoderOptions Base class for format-specific encode options. Format codecs derive their own options from this.
IccColorProfile A parsed ICC color profile, exposing PeachImage’s optimized, colorimetric device→sRGB conversion to library consumers directly — the same engine JPEG decode already uses automatically for a CMYK source with an embedded profile (see GetIccColorProfile() and ConvertToSrgb() for the common case of converting an already-decoded Image). Supports Gray, RGB, and CMYK device color spaces — whatever the profile itself declares via DataColorSpace.
IccProfileException Thrown when IccColorProfile is given bytes that are too short, malformed, or resolve to a device color space or transform PeachImage’s ICC engine doesn’t support. Not derived from ImageFormatException — an ICC profile isn’t an image container format, and can be used independent of any decoded Image (e.g. loaded from a standalone .icc/.icm file).
Image An in-memory, single-frame, tightly-packed pixel buffer decoded from (or destined for) an image file.
ImageFormatException Base type for all exceptions PeachImage throws while identifying, decoding, or encoding images.
ImageMetadata Format-agnostic metadata associated with an Image.
PixelFormatExtensions Helper methods for reasoning about PixelFormat values.
RawMetadataProfile A raw, un-parsed metadata segment captured verbatim during decode so it can be inspected or re-emitted on encode without the core library needing to understand its internal structure.
ResizeOptions Options controlling Resize(int, int, ResizeOptions) and Resize(int, int, ResizeOptions).
UnknownImageFormatException Thrown when no registered codec recognizes an image’s format.
Structs  
ImageFormatInfo Capability and identity metadata for a single image format, independent of any particular image.
ImageInfo Lightweight image dimensions/format info obtainable without decoding full pixel data.
Enums  
AnchorPosition Which part of the source survives cropping (Crop), or where the source is placed within the padded canvas (Pad). Ignored for Exact and Max.
FrameDisposalMethod How an AnimatedImageFrame’s canvas region should be treated before the next frame is drawn. Modeled on GIF’s Graphic Control Extension disposal method (values 0-3; 0 “unspecified” and 1 “do not dispose” both mean “leave as-is” in practice, so they share DoNotDispose/ None here for the raw distinction while behaving identically) — the only format that uses it today, but the concept (and this type) is codec-agnostic.
IccColorSpace The device color space an IccColorProfile declares its transform expects.
IccRenderingIntent An ICC rendering intent (ICC.1:2010 §7.2.15), controlling how an IccColorProfile maps colors that fall outside the destination gamut. Pass null to ConvertToSrgb(ReadOnlySpan<byte>, Span<byte>, int, Nullable<IccRenderingIntent>, bool) to use the profile’s own declared DefaultRenderingIntent instead of choosing one.
MetadataProfileKind Identifies the kind of data carried by a RawMetadataProfile.
PixelFormat Identifies the in-memory layout of a decoded Image’s pixel buffer.
ResamplingFilter The resampling filter used to reconstruct pixel values when resizing an Image.
ResizeMode How ResizeOptions interprets the width/height passed to Resize(int, int, ResizeOptions)/Resize(int, int, ResizeOptions).