PeachImage
PeachImage
EncoderOptions Class
Base class for format-specific encode options. Format codecs derive their own options from this.
public abstract class EncoderOptions
Inheritance System.Object → EncoderOptions
Derived
↳ AvifEncoderOptions
↳ BmpEncoderOptions
↳ GifEncoderOptions
↳ JpegEncoderOptions
↳ JxlEncoderOptions
↳ PngEncoderOptions
↳ WebpEncoderOptions
| Properties | |
|---|---|
| IncludeIccProfile | Whether the encoder writes the source image’s ICC colour profile, independently of IncludeMetadata. When null (the default) the profile is written exactly when IncludeMetadata says to and the format’s encoder supports it, as it always has been. Set it to true together with IncludeMetadata = false to keep the colour profile while dropping EXIF, XMP, text and everything else, or to false to drop only the profile. |
| IncludeMetadata | Whether the encoder re-emits metadata captured on the source Image: its XMP packet and its EXIF block (JPEG APP1, PNG eXIf, WebP EXIF, an AVIF Exif item, JPEG XL) and, unless IncludeIccProfile says otherwise, its ICC profile, plus the format’s own extras (PNG gamma, text and resolution chunks). GIF, BMP and animated WebP have nowhere to put an Image’s metadata and write none. An EXIF block too large for a JPEG APP1 segment (about 64 KB) is left out. Defaults to true. |
| MaxDegreeOfParallelism | Whether to write the ICC profile: IncludeIccProfile when set, else IncludeMetadata. |
| TaskScheduler | An optional scheduler the encoder’s parallel work runs on, so a host can share one limit across concurrent calls (for example the System.Threading.Tasks.ConcurrentExclusiveSchedulerPair.ConcurrentScheduler of a pair created with a bounded concurrency level). null (the default) uses the thread pool. |