IQuantizingSession Interface

KGy SOFT Drawing Libraries Help
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

public interface IQuantizingSession : IDisposable

The IQuantizingSession type exposes the following members.

Properties

  NameDescription
Public propertyAlphaThreshold
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.
Public propertyBackColor
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.
Public propertyIsGrayscale
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)
Public propertyPalette
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 .
Top
Methods

  NameDescription
Public methodGetQuantizedColor
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.
Top
See Also

Reference