ColorConvertedBitmap.DestinationFormat Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets a value that represents the PixelFormat of the converted bitmap.

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

Public Property DestinationFormat As PixelFormat

Property Value

Type: System.Windows.Media.PixelFormat

An instance of PixelFormat.

When you make property changes to a ColorConvertedBitmap, the changes must be done within a BeginInit and EndInit block.

Identifier field

DestinationFormatProperty

Metadata properties set to true

None

The following example shows how to set the value of the DestinationFormat property.

Dim myColorConvertedBitmap As New ColorConvertedBitmap()
myColorConvertedBitmap.BeginInit()
myColorConvertedBitmap.SourceColorContext = myBitmapSourceFrame2.ColorContexts(0)
myColorConvertedBitmap.Source = myBitmapSource2
myColorConvertedBitmap.DestinationFormat = PixelFormats.Pbgra32
myColorConvertedBitmap.DestinationColorContext = New ColorContext(PixelFormats.Bgra32)
myColorConvertedBitmap.EndInit()

.NET Framework
Available since 3.0
Return to top
Show: