Tip
See the Remarks section of the Clone(IReadableBitmapData, Rectangle, KnownPixelFormat, IQuantizer, IDitherer) method for more details.
public static IAsyncResult BeginClone(
this IReadableBitmapData source,
KnownPixelFormat pixelFormat,
IQuantizer? quantizer,
IDitherer? ditherer = null,
Rectangle? sourceRectangle = null,
AsyncConfig? asyncConfig = null
)
<ExtensionAttribute>
Public Shared Function BeginClone (
source As IReadableBitmapData,
pixelFormat As KnownPixelFormat,
quantizer As IQuantizer,
Optional ditherer As IDitherer = Nothing,
Optional sourceRectangle As Rectangle? = Nothing,
Optional asyncConfig As AsyncConfig = Nothing
) As IAsyncResult
public:
[ExtensionAttribute]
static IAsyncResult^ BeginClone(
IReadableBitmapData^ source,
KnownPixelFormat pixelFormat,
IQuantizer^ quantizer,
IDitherer^ ditherer = nullptr,
Nullable<Rectangle> sourceRectangle = nullptr,
AsyncConfig^ asyncConfig = nullptr
)
[<ExtensionAttribute>]
static member BeginClone :
source : IReadableBitmapData *
pixelFormat : KnownPixelFormat *
quantizer : IQuantizer *
?ditherer : IDitherer *
?sourceRectangle : Nullable<Rectangle> *
?asyncConfig : AsyncConfig
(* Defaults:
let _ditherer = defaultArg ditherer null
let _sourceRectangle = defaultArg sourceRectangle null
let _asyncConfig = defaultArg asyncConfig null
*)
-> IAsyncResult
In .NET Framework 4.0 and above you can use also the CloneAsync(IReadableBitmapData, KnownPixelFormat, Palette, NullableRectangle, TaskConfig) method.
To get the result or the exception that occurred during the operation you have to call the EndClone method.
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. |