BitmapDecoder.GetPreviewAsync BitmapDecoder.GetPreviewAsync BitmapDecoder.GetPreviewAsync BitmapDecoder.GetPreviewAsync BitmapDecoder.GetPreviewAsync Method

Definition

Asynchronously returns a stream containing the preview image.

public : IAsyncOperation<ImageStream> GetPreviewAsync()
IAsyncOperation<ImageStream> GetPreviewAsync() const;
public IAsyncOperation<ImageStream> GetPreviewAsync()
Public Function GetPreviewAsync() As IAsyncOperation(Of ImageStream)
Windows.Graphics.Imaging.BitmapDecoder.getPreviewAsync().done( /* Your success and error handlers */ );

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.

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.