SKBitmapExtensionsGetReadWriteBitmapData(SKBitmap, WorkingColorSpace, SKColor, Byte) Method
Namespace: KGySoft.Drawing.SkiaSharpAssembly: KGySoft.Drawing.SkiaSharp (in KGySoft.Drawing.SkiaSharp.dll) Version: 9.1.0
public static IReadWriteBitmapData GetReadWriteBitmapData(
this SKBitmap bitmap,
WorkingColorSpace workingColorSpace,
SKColor backColor = default,
byte alphaThreshold = 128
)
<ExtensionAttribute>
Public Shared Function GetReadWriteBitmapData (
bitmap As SKBitmap,
workingColorSpace As WorkingColorSpace,
Optional backColor As SKColor = Nothing,
Optional alphaThreshold As Byte = 128
) As IReadWriteBitmapData
public:
[ExtensionAttribute]
static IReadWriteBitmapData^ GetReadWriteBitmapData(
SKBitmap^ bitmap,
WorkingColorSpace workingColorSpace,
SKColor backColor = SKColor(),
unsigned char alphaThreshold = 128
)
[<ExtensionAttribute>]
static member GetReadWriteBitmapData :
bitmap : SKBitmap *
workingColorSpace : WorkingColorSpace *
?backColor : SKColor *
?alphaThreshold : byte
(* Defaults:
let _backColor = defaultArg backColor new SKColor()
let _alphaThreshold = defaultArg alphaThreshold 128
*)
-> IReadWriteBitmapData
- bitmap SKBitmap
- An SKBitmap instance, whose data is about to be accessed.
- workingColorSpace WorkingColorSpace
- Determines the WorkingColorSpace property of the result and
specifies the preferred color space that should be used when working with the result bitmap data. The working color space
can be different from the actual color space of the specified bitmap.
See the Remarks section of the WorkingColorSpace enumeration for more details. - backColor SKColor (Optional)
- Determines the BackColor property of the result.
When setting pixels of bitmaps without alpha support, specifies the color of the background.
Color values with alpha, which are considered opaque will be blended with this color before setting the pixel in the result bitmap data.
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.
Can be relevant in some operations such as when drawing another IReadableBitmapData instance with alpha into the returned bitmap data
by the DrawInto extension methods and the specified bitmap
has no alpha support. This parameter is optional.
Default value: 128.
IReadWriteBitmapDataAn
IReadWriteBitmapData instance, which provides fast read-write 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).