Encoder. Flush Async Method
Asynchronously commits and flushes all of the image data.
public: virtual IAsyncAction ^ FlushAsync() = FlushAsync;
/// [Windows.Foundation.Metadata.RemoteAsync] IAsyncAction FlushAsync();
[Windows.Foundation.Metadata.RemoteAsync] public IAsyncAction FlushAsync();
Public Function FlushAsync () As IAsyncAction
An object that manages the asynchronous flush operation.
Call this method when you are done encoding and before you close the output stream. The minimum data you need to set on a new image before calling FlushAsync is the pixel data (@"Windows.Graphics.Imaging.BitmapEncoder.SetPixelData(Windows.Graphics.Imaging.BitmapPixelFormat,Windows.Graphics.Imaging.BitmapAlphaMode,System.UInt32,System.UInt32,System.Double,System.Double,System.Byte)?text=SetPixelData" ). After this method is called, any subsequent calls to BitmapEncoder methods will fail.
If, after encoding is complete, you want to reuse the IRandomAccessStream from which the BitmapEncoder was created, such as passing it to the Windows.Storage.Compression APIs, you must first reset the stream's seek position to 0, the start of the stream, by calling IRandomAccessStream.Seek.