FormatConvertedBitmap.AlphaThreshold Property


Gets or sets the alpha channel threshold of a bitmap when converting to palletized formats that recognizes an alpha color.

Namespace:   System.Windows.Media.Imaging
Assembly:  PresentationCore (in PresentationCore.dll)

public double AlphaThreshold { get; set; }

Property Value

Type: System.Double

The alpha channel threshold for this FormatConvertedBitmap. The default value is 0.0.

The AlphaThreshold value is used to determine what level of opacity will be mapped to the fully transparent color in the converted format. A value of 9.8 implies that any pixel with an alpha value of less than 25 will be mapped to the transparent color. A value of 100 maps all pixels which are not fully opaque to the transparent color.

The destination palette should provide a transparent color; otherwise, the transparent color will be the one closest to zero, often black.

Identifier field


Metadata properties set to true


.NET Framework
Available since 3.0
Return to top