Tip
See the Remarks section of the ToSKBitmap(IReadableBitmapData, SKColorType, SKAlphaType, WorkingColorSpace, IQuantizer, IDitherer) method for more details.
public static Task<SKBitmap?> ToSKBitmapAsync(
this IReadableBitmapData source,
SKColorType colorType,
SKAlphaType alphaType = SKAlphaType.Unknown,
WorkingColorSpace targetColorSpace = WorkingColorSpace.Default,
IQuantizer quantizer = null,
IDitherer ditherer = null,
TaskConfig asyncConfig = null
)
<ExtensionAttribute>
Public Shared Function ToSKBitmapAsync (
source As IReadableBitmapData,
colorType As SKColorType,
Optional alphaType As SKAlphaType = SKAlphaType.Unknown,
Optional targetColorSpace As WorkingColorSpace = WorkingColorSpace.Default,
Optional quantizer As IQuantizer = Nothing,
Optional ditherer As IDitherer = Nothing,
Optional asyncConfig As TaskConfig = Nothing
) As Task(Of SKBitmap)
public:
[ExtensionAttribute]
static Task<SKBitmap^>^ ToSKBitmapAsync(
IReadableBitmapData^ source,
SKColorType colorType,
SKAlphaType alphaType = SKAlphaType::Unknown,
WorkingColorSpace targetColorSpace = WorkingColorSpace::Default,
IQuantizer^ quantizer = nullptr,
IDitherer^ ditherer = nullptr,
TaskConfig^ asyncConfig = nullptr
)
[<ExtensionAttribute>]
static member ToSKBitmapAsync :
source : IReadableBitmapData *
colorType : SKColorType *
?alphaType : SKAlphaType *
?targetColorSpace : WorkingColorSpace *
?quantizer : IQuantizer *
?ditherer : IDitherer *
?asyncConfig : TaskConfig
(* Defaults:
let _alphaType = defaultArg alphaType SKAlphaType.Unknown
let _targetColorSpace = defaultArg targetColorSpace WorkingColorSpace.Default
let _quantizer = defaultArg quantizer null
let _ditherer = defaultArg ditherer null
let _asyncConfig = defaultArg asyncConfig null
*)
-> Task<SKBitmap>
This method is not a blocking call even if the MaxDegreeOfParallelism property of the asyncConfig parameter is 1.
ArgumentNullException | source is . |
ArgumentOutOfRangeException | colorType, alphaType or targetColorSpace does not specify a defined value. |