Accusoft.ImagXpressSdk Namespace > ImageX Class > CreateColorPalette Method : CreateColorPalette(Int32) Method |
'Declaration Public Overloads Shared Function CreateColorPalette( _ ByVal bitsPerPixel As Integer _ ) As ColorPalette
'Usage Dim bitsPerPixel As Integer Dim value As ColorPalette value = ImageX.CreateColorPalette(bitsPerPixel)
public static ColorPalette CreateColorPalette( int bitsPerPixel )
public: static ColorPalette* CreateColorPalette( int bitsPerPixel )
public: static ColorPalette^ CreateColorPalette( int bitsPerPixel )
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.