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.

C#
[Windows.Foundation.Metadata.Overload("CreateAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<BitmapDecoder> CreateAsync(IRandomAccessStream stream);

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

WinRT Build 26100 ve diğer sürümler
Ürün Sürümler
WinRT Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100

CreateAsync(Guid, IRandomAccessStream)

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

C#
[Windows.Foundation.Metadata.Overload("CreateWithIdAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<BitmapDecoder> CreateAsync(Guid decoderId, IRandomAccessStream stream);

Parameters

decoderId
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

WinRT Build 26100 ve diğer sürümler
Ürün Sürümler
WinRT Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100