BitmapPalettes Class

Defines several color palettes that are commonly used by bitmap images.

Namespace: System.Windows.Media.Imaging
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

'Declaration
Public NotInheritable Class BitmapPalettes
'Usage

public final class BitmapPalettes
public final class BitmapPalettes
You cannot use this managed class in XAML.

BitmapPalettes that end in Transparent have an additional "color" appended to the end of them that is fully transparent. In the case of palettes that already have 256 colors, the last color will be replaced by the transparent color.

Only Tagged Image File Format (TIFF) and Graphics Interchange Format (GIF) image formats support palettes.

The following code example demonstrates how to construct a new BitmapSource by using a member of the BitmapPalettes class.

Dim image5 As BitmapSource = System.Windows.Media.Imaging.BitmapSource.Create(width, height, 96, 96, PixelFormats.Indexed1, BitmapPalettes.WebPalette, pixels, stride)

Dim stream5 As New FileStream("palette.tif", FileMode.Create)
Dim encoder5 As New TiffBitmapEncoder()
encoder5.Frames.Add(BitmapFrame.Create(image5))
encoder5.Save(stream5)

System.Object
  System.Windows.Media.Imaging.BitmapPalettes

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show: