Sprache

ColorPalette.CreateOptimalPalette(Int32, Boolean, Bitmap) Methode

Definition

Erstellt eine optimale Farbpalette basierend auf den Farben in einer bestimmten 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

Parameter

colors
Int32

Die Anzahl der Farben, die sie in einer optimalen Palette basierend auf einer angegebenen Bitmap aufweisen möchten.

useTransparentColor
Boolean

trueum die transparente Farbe in die Palette einzuschließen; andernfalls . false

bitmap
Bitmap

Die Bitmap, auf der die optimale Farbpalette zugrunde geschaltet werden soll.

Gibt zurück

Die optimale Farbpalette für die angegebene Bitmap.

Gilt für: