BitmapPalettes Class
Defines several color palettes that are commonly used by bitmap images.
Assembly: PresentationCore (in PresentationCore.dll)
BitmapPalettes properties whose names end with "Transparent" have an additional "color" that is fully transparent. In the case of palettes that already have 256 colors, the last color is 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 in a similar way.
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)
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.