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
Surađujte s nama na GitHubu
Izvor za ovaj sadržaj možete pronaći na GitHubu, gdje možete stvarati i pregledavati probleme i zahtjeve za povlačenjem. Dodatne informacije potražite u našem vodiču za suradnike.