SKImageInfoExtensionsGetMatchingQuantizer Method
Namespace: KGySoft.Drawing.SkiaSharpAssembly: KGySoft.Drawing.SkiaSharp (in KGySoft.Drawing.SkiaSharp.dll) Version: 9.0.0
public static PredefinedColorsQuantizer GetMatchingQuantizer(
this SKImageInfo imageInfo,
SKColor backColor = default,
byte alphaThreshold = 128
)
<ExtensionAttribute>
Public Shared Function GetMatchingQuantizer (
imageInfo As SKImageInfo,
Optional backColor As SKColor = Nothing,
Optional alphaThreshold As Byte = 128
) As PredefinedColorsQuantizer
public:
[ExtensionAttribute]
static PredefinedColorsQuantizer^ GetMatchingQuantizer(
SKImageInfo imageInfo,
SKColor backColor = SKColor(),
unsigned char alphaThreshold = 128
)
[<ExtensionAttribute>]
static member GetMatchingQuantizer :
imageInfo : SKImageInfo *
?backColor : SKColor *
?alphaThreshold : byte
(* Defaults:
let _backColor = defaultArg backColor new SKColor()
let _alphaThreshold = defaultArg alphaThreshold 128
*)
-> PredefinedColorsQuantizer
- imageInfo SKImageInfo
- The SKImageInfo to get a quantizer for.
- backColor SKColor (Optional)
- Colors with alpha (transparency), which are considered opaque will be blended with this color before quantization.
The Alpha property of the background color is ignored. This parameter is optional.
Default value: The bitwise zero instance of SKColor, which has the same RGB values as Black. - alphaThreshold Byte (Optional)
- Specifies a threshold value for the Alpha property,
under which a quantized color is considered completely transparent. This parameter is optional.
Default value: 128.
PredefinedColorsQuantizerA
PredefinedColorsQuantizer instance that is compatible with the specified
imageInfo.In Visual Basic and C#, you can call this method as an instance method on any object of type
SKImageInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).