PeachImage

PeachImage.Formats.Png.PngEncoderOptions

PngEncoderOptions.MaxColors Property

The palette size, in [1, 256], indexed encoding quantizes down to. In Auto mode this also doubles as the distinct-color-count threshold below which indexed output is chosen automatically — the default of 256 only auto-indexes sources that already have at most 256 distinct colors, which is always lossless. In Indexed mode, a source with more distinct colors than this is quantized down via median-cut, which is lossy. Default 256.

public int MaxColors { get; init; }

Property Value

System.Int32