IQuantizingSessionAlphaThreshold Property

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.

Definition

Namespace: KGySoft.Drawing.Imaging
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 8.1.0
C#
byte AlphaThreshold { get; }

Property Value

Byte

Remarks

If this IQuantizingSession can produce transparent pixels, and GetQuantizedColor is called with a color, whose Color32.A field is lower than the threshold, then the returned color will be transparent.

If this IQuantizingSession cannot produce transparent pixels, or GetQuantizedColor is called with a color, whose Color32.A field is greater than or equal to the threshold, then the returned color will be will be blended with BackColor before quantizing.

If AlphaThreshold is 0, then the quantized color will never be transparent.

If AlphaThreshold is 255, then only fully opaque colors will not be considered transparent.

See Also