Note
For examples see the Examples section of the mentioned methods above.
public static PredefinedColorsQuantizer FromPixelFormat(
KnownPixelFormat pixelFormat,
Color32 backColor = default,
byte alphaThreshold = 128
)
Public Shared Function FromPixelFormat (
pixelFormat As KnownPixelFormat,
Optional backColor As Color32 = Nothing,
Optional alphaThreshold As Byte = 128
) As PredefinedColorsQuantizer
public:
static PredefinedColorsQuantizer^ FromPixelFormat(
KnownPixelFormat pixelFormat,
Color32 backColor = Color32(),
unsigned char alphaThreshold = 128
)
static member FromPixelFormat :
pixelFormat : KnownPixelFormat *
?backColor : Color32 *
?alphaThreshold : byte
(* Defaults:
let _backColor = defaultArg backColor new Color32()
let _alphaThreshold = defaultArg alphaThreshold 128
*)
-> PredefinedColorsQuantizer
If pixelFormat is Format24bppRgb, Format32bppRgb, Format48bppRgb or Format96bppRgb, then this method returns the same quantizer as the Rgb888 method.
If pixelFormat is Format16bppArgb1555, then this method returns the same quantizer as the Argb1555 method.
If pixelFormat is Format16bppRgb565, then this method returns the same quantizer as the Rgb565 method.
If pixelFormat is Format16bppRgb555, then this method returns the same quantizer as the Rgb555 method.
If pixelFormat is Format8bppGrayScale, Format16bppGrayScale or Format32bppGrayScale, then this method returns the same quantizer as the Grayscale method.
If pixelFormat is Format8bppIndexed, then this method returns the same quantizer as the SystemDefault8BppPalette method.
If pixelFormat is Format4bppIndexed, then this method returns the same quantizer as the SystemDefault4BppPalette method.
If pixelFormat is Format1bppIndexed, then this method returns the same quantizer as the SystemDefault1BppPalette method.
In any other case than the ones above this method the same quantizer as the Argb8888 method.