Share via


BitmapDecoder.CreateAsync Method

Definition

Overloads

CreateAsync(IRandomAccessStream)

Asynchronously creates a new BitmapDecoder and initializes it using a stream.

CreateAsync(Guid, IRandomAccessStream)

Asynchronously creates a new BitmapDecoder using a specific bitmap codec and initializes it using a stream.

CreateAsync(IRandomAccessStream)

Asynchronously creates a new BitmapDecoder and initializes it using a stream.

public:
 static IAsyncOperation<BitmapDecoder ^> ^ CreateAsync(IRandomAccessStream ^ stream);
/// [Windows.Foundation.Metadata.Overload("CreateAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<BitmapDecoder> CreateAsync(IRandomAccessStream const& stream);
[Windows.Foundation.Metadata.Overload("CreateAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<BitmapDecoder> CreateAsync(IRandomAccessStream stream);
function createAsync(stream)
Public Shared Function CreateAsync (stream As IRandomAccessStream) As IAsyncOperation(Of BitmapDecoder)

Parameters

stream
IRandomAccessStream

The stream containing the image file to be decoded.

Returns

An object that manages the asynchronous creation of a new BitmapDecoder.

Attributes

Remarks

Windows.Graphics.Imaging automatically determines the correct bitmap decoder to decode the stream.

See also

Applies to

CreateAsync(Guid, IRandomAccessStream)

Asynchronously creates a new BitmapDecoder using a specific bitmap codec and initializes it using a stream.

public:
 static IAsyncOperation<BitmapDecoder ^> ^ CreateAsync(Platform::Guid decoderId, IRandomAccessStream ^ stream);
/// [Windows.Foundation.Metadata.Overload("CreateWithIdAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<BitmapDecoder> CreateAsync(winrt::guid const& decoderId, IRandomAccessStream const& stream);
[Windows.Foundation.Metadata.Overload("CreateWithIdAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<BitmapDecoder> CreateAsync(Guid decoderId, IRandomAccessStream stream);
function createAsync(decoderId, stream)
Public Shared Function CreateAsync (decoderId As Guid, stream As IRandomAccessStream) As IAsyncOperation(Of BitmapDecoder)

Parameters

decoderId
Guid

Platform::Guid

winrt::guid

The unique identifier of the specified bitmap codec.

stream
IRandomAccessStream

The stream containing the image file to be decoded.

Returns

An object that manages the asynchronous creation of a new BitmapDecoder.

Attributes

Remarks

This method allows the application to explicitly select the bitmap decoder to be used and bypass any automatic codec arbitration. The unique identifiers of the built-in decoders are available as properties on BitmapDecoder. In addition, the unique identifier of any installed decoder can be obtained using the GetDecoderInformationEnumerator method.

See also

Applies to