Tip
See the Remarks section of the Clone(IReadableBitmapData, Rectangle, KnownPixelFormat, Palette) method for more details.
public static Task<IReadWriteBitmapData?> CloneAsync(
this IReadableBitmapData source,
KnownPixelFormat pixelFormat,
Palette? palette,
Rectangle? sourceRectangle = null,
TaskConfig? asyncConfig = null
)
<ExtensionAttribute>
Public Shared Function CloneAsync (
source As IReadableBitmapData,
pixelFormat As KnownPixelFormat,
palette As Palette,
Optional sourceRectangle As Rectangle? = Nothing,
Optional asyncConfig As TaskConfig = Nothing
) As Task(Of IReadWriteBitmapData)
public:
[ExtensionAttribute]
static Task<IReadWriteBitmapData^>^ CloneAsync(
IReadableBitmapData^ source,
KnownPixelFormat pixelFormat,
Palette^ palette,
Nullable<Rectangle> sourceRectangle = nullptr,
TaskConfig^ asyncConfig = nullptr
)
[<ExtensionAttribute>]
static member CloneAsync :
source : IReadableBitmapData *
pixelFormat : KnownPixelFormat *
palette : Palette *
?sourceRectangle : Nullable<Rectangle> *
?asyncConfig : TaskConfig
(* Defaults:
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 | palette contains too many colors for the specified pixelFormat. |