Defines several color palettes that are commonly used by bitmap images.
Assembly: PresentationCore (in PresentationCore.dll)
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 class in a similar way.
BitmapSource image5 = BitmapSource.Create( width, height, 96, 96, PixelFormats.Indexed1, BitmapPalettes.WebPalette, pixels, stride); FileStream stream5 = new FileStream("palette.tif", FileMode.Create); TiffBitmapEncoder encoder5 = 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.