Tip
See the Remarks section of the EncodeHighColorImage method for more details.
public static IAsyncResult BeginEncodeHighColorImage(
IReadableBitmapData imageData,
Stream stream,
bool allowFullScan = false,
Color32 backColor = default,
byte alphaThreshold = 128,
AsyncConfig? asyncConfig = null
)
Public Shared Function BeginEncodeHighColorImage (
imageData As IReadableBitmapData,
stream As Stream,
Optional allowFullScan As Boolean = false,
Optional backColor As Color32 = Nothing,
Optional alphaThreshold As Byte = 128,
Optional asyncConfig As AsyncConfig = Nothing
) As IAsyncResult
public:
static IAsyncResult^ BeginEncodeHighColorImage(
IReadableBitmapData^ imageData,
Stream^ stream,
bool allowFullScan = false,
Color32 backColor = Color32(),
unsigned char alphaThreshold = 128,
AsyncConfig^ asyncConfig = nullptr
)
static member BeginEncodeHighColorImage :
imageData : IReadableBitmapData *
stream : Stream *
?allowFullScan : bool *
?backColor : Color32 *
?alphaThreshold : byte *
?asyncConfig : AsyncConfig
(* Defaults:
let _allowFullScan = defaultArg allowFullScan false
let _backColor = defaultArg backColor new Color32()
let _alphaThreshold = defaultArg alphaThreshold 128
let _asyncConfig = defaultArg asyncConfig null
*)
-> IAsyncResult
In .NET Framework 4.0 and above you can use also the EncodeHighColorImageAsync method.
To finish the operation and to get the exception that occurred during the operation you have to call the EndEncodeHighColorImage method.
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 some processing steps if the size of a layer exceeds a threshold.
ArgumentNullException | imageData or stream is . |