This topic has not yet been rated - Rate this topic

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)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
public double AlphaThreshold { get; set; }
<object AlphaThreshold="double" .../>

Property Value

Type: System.Double
The alpha channel threshold for this FormatConvertedBitmap. The default value is 0.0.

Identifier field

AlphaThresholdProperty

Metadata properties set to true

None

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.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ