ColorPalette.CreateOptimalPalette(Int32, Boolean, Bitmap) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates an optimal color palette based on the colors in a given bitmap.
public:
static System::Drawing::Imaging::ColorPalette ^ CreateOptimalPalette(int colors, bool useTransparentColor, System::Drawing::Bitmap ^ bitmap);
public static System.Drawing.Imaging.ColorPalette CreateOptimalPalette (int colors, bool useTransparentColor, System.Drawing.Bitmap bitmap);
static member CreateOptimalPalette : int * bool * System.Drawing.Bitmap -> System.Drawing.Imaging.ColorPalette
Public Shared Function CreateOptimalPalette (colors As Integer, useTransparentColor As Boolean, bitmap As Bitmap) As ColorPalette
Parameters
- colors
- Int32
The number of colors you want to have in an optimal palette based on a the specified bitmap.
- useTransparentColor
- Boolean
true
to include the transparent color in the palette; otherwise, false
.
- bitmap
- Bitmap
The bitmap to base the optimal color palette off of.
Returns
The optimal color palette for the specified bitmap.
Applies to
Werk met ons samen op GitHub
De bron voor deze inhoud vindt u op GitHub, waar u ook problemen en pull-aanvragen kunt maken en bekijken. Raadpleeg onze gids voor inzenders voor meer informatie.