Tip
See the Remarks section of the AdjustBrightness method for more details.
public static IAsyncResult BeginAdjustBrightness(
this IReadWriteBitmapData bitmapData,
float brightness,
IDitherer? ditherer = null,
ColorChannels channels = ColorChannels.Rgb,
AsyncConfig? asyncConfig = null
)
<ExtensionAttribute>
Public Shared Function BeginAdjustBrightness (
bitmapData As IReadWriteBitmapData,
brightness As Single,
Optional ditherer As IDitherer = Nothing,
Optional channels As ColorChannels = ColorChannels.Rgb,
Optional asyncConfig As AsyncConfig = Nothing
) As IAsyncResult
public:
[ExtensionAttribute]
static IAsyncResult^ BeginAdjustBrightness(
IReadWriteBitmapData^ bitmapData,
float brightness,
IDitherer^ ditherer = nullptr,
ColorChannels channels = ColorChannels::Rgb,
AsyncConfig^ asyncConfig = nullptr
)
[<ExtensionAttribute>]
static member BeginAdjustBrightness :
bitmapData : IReadWriteBitmapData *
brightness : float32 *
?ditherer : IDitherer *
?channels : ColorChannels *
?asyncConfig : AsyncConfig
(* Defaults:
let _ditherer = defaultArg ditherer null
let _channels = defaultArg channels ColorChannels.Rgb
let _asyncConfig = defaultArg asyncConfig null
*)
-> IAsyncResult
In .NET Framework 4.0 and above you can use also the AdjustBrightnessAsync method.
To finish the operation and to get the exception that occurred during the operation you have to call the EndAdjustBrightness method.
This method is not a blocking call even if the MaxDegreeOfParallelism property of the asyncConfig parameter is 1.
ArgumentNullException | bitmapData is . |
ArgumentOutOfRangeException | brightness is not between -1 and 1
-or- channels is out of the defined flags. |