Tip
See the Remarks section of the ReplaceColor method for more details.
public static IAsyncResult BeginReplaceColor(
this IReadWriteBitmapData bitmapData,
Color32 oldColor,
Color32 newColor,
IDitherer? ditherer = null,
AsyncConfig? asyncConfig = null
)
<ExtensionAttribute>
Public Shared Function BeginReplaceColor (
bitmapData As IReadWriteBitmapData,
oldColor As Color32,
newColor As Color32,
Optional ditherer As IDitherer = Nothing,
Optional asyncConfig As AsyncConfig = Nothing
) As IAsyncResult
public:
[ExtensionAttribute]
static IAsyncResult^ BeginReplaceColor(
IReadWriteBitmapData^ bitmapData,
Color32 oldColor,
Color32 newColor,
IDitherer^ ditherer = nullptr,
AsyncConfig^ asyncConfig = nullptr
)
[<ExtensionAttribute>]
static member BeginReplaceColor :
bitmapData : IReadWriteBitmapData *
oldColor : Color32 *
newColor : Color32 *
?ditherer : IDitherer *
?asyncConfig : AsyncConfig
(* Defaults:
let _ditherer = defaultArg ditherer null
let _asyncConfig = defaultArg asyncConfig null
*)
-> IAsyncResult
In .NET Framework 4.0 and above you can use also the ReplaceColorAsync method.
To finish the operation and to get the exception that occurred during the operation you have to call the EndReplaceColor method.
This method is not a blocking call even if the MaxDegreeOfParallelism property of the asyncConfig parameter is 1.