DithererExtensionsInitializeAsync Method
Gets an
IDitheringSession instance potentially asynchronously that can be used to dither the result of the specified
IQuantizingSession
applied to the specified
source.
If
ditherer is a known ditherer that can be evaluated quickly, then this method might be executed synchronously.
This method is available in.NET Framework 4.0 and above.
Namespace: KGySoft.Drawing.ImagingAssembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 8.2.0
public static Task<IDitheringSession?> InitializeAsync(
this IDitherer ditherer,
IReadableBitmapData source,
IQuantizingSession quantizingSession,
TaskConfig? asyncConfig = null
)
<ExtensionAttribute>
Public Shared Function InitializeAsync (
ditherer As IDitherer,
source As IReadableBitmapData,
quantizingSession As IQuantizingSession,
Optional asyncConfig As TaskConfig = Nothing
) As Task(Of IDitheringSession)
public:
[ExtensionAttribute]
static Task<IDitheringSession^>^ InitializeAsync(
IDitherer^ ditherer,
IReadableBitmapData^ source,
IQuantizingSession^ quantizingSession,
TaskConfig^ asyncConfig = nullptr
)
[<ExtensionAttribute>]
static member InitializeAsync :
ditherer : IDitherer *
source : IReadableBitmapData *
quantizingSession : IQuantizingSession *
?asyncConfig : TaskConfig
(* Defaults:
let _asyncConfig = defaultArg asyncConfig null
*)
-> Task<IDitheringSession>
- ditherer IDitherer
- An IDitherer instance to get an IDitheringSession for.
- source IReadableBitmapData
- The dithering session to be initialized will be performed on the specified IReadableBitmapData instance.
- quantizingSession IQuantizingSession
- The IQuantizingSession to which the dithering should be applied.
- asyncConfig TaskConfig (Optional)
- The configuration of the asynchronous operation such as parallelization, cancellation, reporting progress, etc. This parameter is optional.
Default value: .
TaskIDitheringSessionA task that represents the asynchronous operation. Its result is an
IDitheringSession instance that can be used to dither the result of the specified
IQuantizingSession
applied to the specified
source, or
, if the operation was canceled and
the
ThrowIfCanceled property of the
asyncConfig parameter was
.In Visual Basic and C#, you can call this method as an instance method on any object of type
IDitherer. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).