Tip
See the Remarks section of the Clone(IReadableBitmapData, Rectangle, KnownPixelFormat, Color32, Byte) method for more details.
public static IAsyncResult BeginClone(
this IReadableBitmapData source,
KnownPixelFormat pixelFormat,
WorkingColorSpace workingColorSpace,
Color32 backColor = default,
byte alphaThreshold = 128,
Rectangle? sourceRectangle = null,
AsyncConfig? asyncConfig = null
)
<ExtensionAttribute>
Public Shared Function BeginClone (
source As IReadableBitmapData,
pixelFormat As KnownPixelFormat,
workingColorSpace As WorkingColorSpace,
Optional backColor As Color32 = Nothing,
Optional alphaThreshold As Byte = 128,
Optional sourceRectangle As Rectangle? = Nothing,
Optional asyncConfig As AsyncConfig = Nothing
) As IAsyncResult
public:
[ExtensionAttribute]
static IAsyncResult^ BeginClone(
IReadableBitmapData^ source,
KnownPixelFormat pixelFormat,
WorkingColorSpace workingColorSpace,
Color32 backColor = Color32(),
unsigned char alphaThreshold = 128,
Nullable<Rectangle> sourceRectangle = nullptr,
AsyncConfig^ asyncConfig = nullptr
)
[<ExtensionAttribute>]
static member BeginClone :
source : IReadableBitmapData *
pixelFormat : KnownPixelFormat *
workingColorSpace : WorkingColorSpace *
?backColor : Color32 *
?alphaThreshold : byte *
?sourceRectangle : Nullable<Rectangle> *
?asyncConfig : AsyncConfig
(* Defaults:
let _backColor = defaultArg backColor new Color32()
let _alphaThreshold = defaultArg alphaThreshold 128
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, Color32, Byte, 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. |