مشاركة عبر


BitmapEncoder.FlushAsync Method

Definition

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();
function flushAsync()
Public Function FlushAsync () As IAsyncAction

Returns

An object that manages the asynchronous flush operation.

Attributes

Remarks

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 (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.

Applies to