public static PredefinedColorsQuantizer FromCustomPalette(
Color[] palette,
Color backColor = default,
byte alphaThreshold = 128
)Public Shared Function FromCustomPalette (
palette As Color(),
Optional backColor As Color = Nothing,
Optional alphaThreshold As Byte = 128
) As PredefinedColorsQuantizerpublic:
static PredefinedColorsQuantizer^ FromCustomPalette(
array<Color>^ palette,
Color backColor = Color(),
unsigned char alphaThreshold = 128
)static member FromCustomPalette :
palette : Color[] *
?backColor : Color *
?alphaThreshold : byte
(* Defaults:
let _backColor = defaultArg backColor new Color()
let _alphaThreshold = defaultArg alphaThreshold 128
*)
-> PredefinedColorsQuantizer The PredefinedColorsQuantizer instance returned by this method will use a Palette internally, created from the colors specified in the palette parameter. When quantizing, best matching colors might be looked up sequentially and results might be cached.
If a color to be quantized can be mapped to a color index directly, then create a Palette instance explicitly, specifying the custom mapping logic and use the FromCustomPalette(Palette) overload instead.
If a color to be quantized can be transformed to a result color directly, and the quantized result is not needed to be an indexed image, then use the FromCustomFunction overloads instead.