Share via


BitmapDecoder.GetPreviewAsync Method

Definition

Asynchronously returns a stream containing the preview image.

public:
 virtual IAsyncOperation<ImageStream ^> ^ GetPreviewAsync() = GetPreviewAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<ImageStream> GetPreviewAsync();
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<ImageStream> GetPreviewAsync();
function getPreviewAsync()
Public Function GetPreviewAsync () As IAsyncOperation(Of ImageStream)

Returns

Object that manages the asynchronous retrieval of the bitmap preview data.

The preview data is returned in the form of an image stream. You can display it using an image control, or read and edit it using BitmapDecoder and BitmapEncoder.

Attributes

Remarks

Some image formats, like JPEG-XR and camera RAW formats, contain an image preview. The preview is generally higher resolution than a thumbnail. This is an advantage because decoding the preview can be faster than decoding the full RAW image, but provides comparable fidelity when displaying images

If the image does not contain a preview, this operation fails with HRESULT WINCODEC_ERR_UNSUPPORTEDOPERATION.

Applies to