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 (in KGySoft.Drawing.dll) Version: 6.0.0

public interface IQuantizingSession : IDisposable

The IQuantizingSession type exposes the following members.


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 propertyPalette
Gets the palette containing the colors of the quantized result. Expected to be called if the result of the quantization is an indexed image and in that case should not contain more than 256 colors. If this IQuantizingSession is not limited to use up to 256 colors, then this property can return .

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.
See Also