Tip
See the Remarks section of the Clone(IReadableBitmapData, Rectangle, KnownPixelFormat, IQuantizer, IDitherer) method for more details.
public static Task<IReadWriteBitmapData?> CloneAsync(
this IReadableBitmapData source,
KnownPixelFormat pixelFormat,
IQuantizer? quantizer,
IDitherer? ditherer = null,
Rectangle? sourceRectangle = null,
TaskConfig? asyncConfig = null
)
<ExtensionAttribute>
Public Shared Function CloneAsync (
source As IReadableBitmapData,
pixelFormat As KnownPixelFormat,
quantizer As IQuantizer,
Optional ditherer As IDitherer = Nothing,
Optional sourceRectangle As Rectangle? = Nothing,
Optional asyncConfig As TaskConfig = Nothing
) As Task(Of IReadWriteBitmapData)
public:
[ExtensionAttribute]
static Task<IReadWriteBitmapData^>^ CloneAsync(
IReadableBitmapData^ source,
KnownPixelFormat pixelFormat,
IQuantizer^ quantizer,
IDitherer^ ditherer = nullptr,
Nullable<Rectangle> sourceRectangle = nullptr,
TaskConfig^ asyncConfig = nullptr
)
[<ExtensionAttribute>]
static member CloneAsync :
source : IReadableBitmapData *
pixelFormat : KnownPixelFormat *
quantizer : IQuantizer *
?ditherer : IDitherer *
?sourceRectangle : Nullable<Rectangle> *
?asyncConfig : TaskConfig
(* Defaults:
let _ditherer = defaultArg ditherer null
let _sourceRectangle = defaultArg sourceRectangle null
let _asyncConfig = defaultArg asyncConfig null
*)
-> Task<IReadWriteBitmapData>
This method is not a blocking call even if the MaxDegreeOfParallelism property of the asyncConfig parameter is 1.
ArgumentNullException | source is . |
ArgumentOutOfRangeException | pixelFormat does not specify a valid format.
-or- sourceRectangle has no overlapping region with source bounds. |
ArgumentException | quantizer uses a palette with too many colors for the specified pixelFormat. |