SKBitmapExtensionsGetReadableBitmapData(SKBitmap, SKColor, Byte) Method
Namespace: KGySoft.Drawing.SkiaSharpAssembly: KGySoft.Drawing.SkiaSharp (in KGySoft.Drawing.SkiaSharp.dll) Version: 9.0.0
public static IReadableBitmapData GetReadableBitmapData(
this SKBitmap bitmap,
SKColor backColor = default,
byte alphaThreshold = 128
)
<ExtensionAttribute>
Public Shared Function GetReadableBitmapData (
bitmap As SKBitmap,
Optional backColor As SKColor = Nothing,
Optional alphaThreshold As Byte = 128
) As IReadableBitmapData
public:
[ExtensionAttribute]
static IReadableBitmapData^ GetReadableBitmapData(
SKBitmap^ bitmap,
SKColor backColor = SKColor(),
unsigned char alphaThreshold = 128
)
[<ExtensionAttribute>]
static member GetReadableBitmapData :
bitmap : SKBitmap *
?backColor : SKColor *
?alphaThreshold : byte
(* Defaults:
let _backColor = defaultArg backColor new SKColor()
let _alphaThreshold = defaultArg alphaThreshold 128
*)
-> IReadableBitmapData
- bitmap SKBitmap
- An SKBitmap instance, whose data is about to be accessed.
- backColor SKColor (Optional)
- Determines the BackColor property of the result. As SkiaSharp does not support indexed formats
with palette anymore the backColor for the read-only result bitmap data is relevant in very rare cases only, such as cloning by
the Clone(IReadableBitmapData, KnownPixelFormat, IDitherer) method or obtaining a quantizer by
the FromBitmapData(IBitmapData) method.
The Alpha property of the specified 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)
- Determines the AlphaThreshold property of the result.
Similarly to backColor, for an IReadableBitmapData instance the alphaThreshold is relevant
in very rare cases such as cloning the result or obtaining a matching quantizer from it. This parameter is optional.
Default value: 128.
IReadableBitmapDataAn
IReadableBitmapData instance, which provides fast read-only access to the actual data of the specified
bitmap.In Visual Basic and C#, you can call this method as an instance method on any object of type
SKBitmap. 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).