March 2003
Intermediate to advanced
896 pages
32h 35m
English
ColorPalette
This class encapsulates an array of related colors that make up a color palette.
You can retrieve an array of the Entries in the
palette (each is a System.Drawing.Color value).
You can also get a Flags integer that rather
unpleasantly depends on the magic cookies 0x01 to indicate that the
colors contain alpha information, 0x02 to indicate that the colors
represent grayscales, and 0x04 to indicate that the array contains
halftone values. Those values are listed in the
PaletteFlags enumeration, but you have to cast
them to an integer before they can be used.
public sealed class ColorPalette { // Public Instance Properties public Color[ ] Entries{get; } public int Flags{get; } }
System.Drawing.Image.Palette
System.Drawing.Image.Palette,
ImageAttributes.GetAdjustedPalette()