PeachImage
PeachImage
DecoderOptions Class
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.
public class DecoderOptions
Inheritance System.Object → DecoderOptions
Derived
↳ AvifDecoderOptions
↳ BmpDecoderOptions
↳ GifDecoderOptions
↳ JpegDecoderOptions
↳ PngDecoderOptions
↳ TiffDecoderOptions
↳ WebpDecoderOptions
| Properties | |
|---|---|
| TargetPixelFormat | The pixel format the caller wants the decoded Image to use, analogous to stb_image’s req_comp. When null, the decoder produces whatever format is most natural for the source data. |