Tip
See the Remarks section of the EncodeImage method for more details.
public static Task EncodeImageAsync(
IReadableBitmapData imageData,
Stream stream,
IQuantizer? quantizer = null,
IDitherer? ditherer = null,
TaskConfig? asyncConfig = null
)
Public Shared Function EncodeImageAsync (
imageData As IReadableBitmapData,
stream As Stream,
Optional quantizer As IQuantizer = Nothing,
Optional ditherer As IDitherer = Nothing,
Optional asyncConfig As TaskConfig = Nothing
) As Task
public:
static Task^ EncodeImageAsync(
IReadableBitmapData^ imageData,
Stream^ stream,
IQuantizer^ quantizer = nullptr,
IDitherer^ ditherer = nullptr,
TaskConfig^ asyncConfig = nullptr
)
static member EncodeImageAsync :
imageData : IReadableBitmapData *
stream : Stream *
?quantizer : IQuantizer *
?ditherer : IDitherer *
?asyncConfig : TaskConfig
(* Defaults:
let _quantizer = defaultArg quantizer null
let _ditherer = defaultArg ditherer null
let _asyncConfig = defaultArg asyncConfig null
*)
-> Task
This method is not a blocking call even if the MaxDegreeOfParallelism property of the asyncConfig parameter is 1. The encoding itself cannot be parallelized. The MaxDegreeOfParallelism setting affects only the quantizing session if imageData has a non-indexed pixel format, or when quantizer is set.
ArgumentNullException | imageData or stream is . |