ReadableBitmapDataExtensionsToWriteableBitmap(IReadableBitmapData, IQuantizer, IDitherer) Method
Converts the specified
source to a
WriteableBitmap using an optionally specified
quantizer and
ditherer.
Namespace: KGySoft.Drawing.WinUIAssembly: KGySoft.Drawing.WinUI (in KGySoft.Drawing.WinUI.dll) Version: 9.0.0
public static WriteableBitmap ToWriteableBitmap(
this IReadableBitmapData source,
IQuantizer? quantizer,
IDitherer? ditherer = null
)
<ExtensionAttribute>
Public Shared Function ToWriteableBitmap (
source As IReadableBitmapData,
quantizer As IQuantizer,
Optional ditherer As IDitherer = Nothing
) As WriteableBitmap
public:
[ExtensionAttribute]
static WriteableBitmap^ ToWriteableBitmap(
IReadableBitmapData^ source,
IQuantizer^ quantizer,
IDitherer^ ditherer = nullptr
)
[<ExtensionAttribute>]
static member ToWriteableBitmap :
source : IReadableBitmapData *
quantizer : IQuantizer *
?ditherer : IDitherer
(* Defaults:
let _ditherer = defaultArg ditherer null
*)
-> WriteableBitmap
- source IReadableBitmapData
- The source IReadableBitmapData instance to convert.
- quantizer IQuantizer
- An IQuantizer instance to use for the conversion, or to do the conversion without reducing the colors.
- ditherer IDitherer (Optional)
- An IDitherer instance to use for the conversion or to do the conversion without dithering. This parameter is optional.
Default value: .
WriteableBitmapA
WriteableBitmap instance that has the same content as the specified
source.In Visual Basic and C#, you can call this method as an instance method on any object of type
IReadableBitmapData. 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).
If quantizer is , then the ditherer is also ignored.
This method adjusts the degree of parallelization automatically, blocks the caller, and does not support cancellation or reporting progress.
Use the
ToWriteableBitmapAsync for asynchronous call and to adjust parallelization, set up cancellation and for reporting progress.