Visual Basic
C#
Managed Extensions for C++
C++/CLI
Parameters
- bitsPerPixel
- An integer which represents the bits per pixel.
Return Value
A System.Drawing.Imaging.ColorPalette object.This helper function is for convenience and can be used as a class factory for the System.Drawing.Imaging.ColorPalette class since it is a sealed class that does not allow it to be dynamically created with a new.
If the bitsPerPixel is either 1, 4 or 8, then a ColorPalette is created with 2, 16, and 256 entries respectively. Any other value will return an empty ColorPalette with zero entries.