Represents a disposable quantizing session returned by the IQuantizer.Initialize method
that is used to quantize (reduce the colors) of a specific IReadableBitmapData source.
Namespace: KGySoft.Drawing.Imaging
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 7.0.0-preview.2
Syntax
The IQuantizingSession type exposes the following members.
Properties
Name | Description | |
---|---|---|
![]() | AlphaThreshold |
If this IQuantizingSession can produce transparent pixels, then gets the alpha threshold value
that can be used to determine whether a color with alpha should be considered transparent or should be blended with BackColor.
See the Remarks section for details. |
![]() | BackColor |
Gets the background color for this IQuantizingSession.
When the GetQuantizedColor is called with a color with alpha,
which is considered opaque, then it will be blended with this color before quantizing.
See also the Remarks section of the AlphaThreshold property for details. |
![]() | IsGrayscale |
Gets whether this IQuantizingSession works with grayscale colors.
Its value may help to optimize the processing in some cases but it is allowed to return always .
Default value: . (Only in .NET Core 3.0/.NET Standard 2.1 and above. In earlier targeted frameworks this member must be implemented) |
![]() | Palette |
Gets the palette containing the colors of the quantized result. Expected to be called if the target of the quantization
is indexed. Typical indexed pixel formats contain no more than 256 colors; however, it is allowed to return a bigger Palette.
If the corresponding IQuantizer returns a non-indexed pixel format in its PixelFormatHint property, then this property can return .
|
Methods
Name | Description | |
---|---|---|
![]() | GetQuantizedColor |
Gets the quantized color of the specified origColor. If Palette property has non- return value,
then the result color must be a valid Palette entry.
See the also Remarks section of the AlphaThreshold property for details. |
See Also