BitmapDecoder.CreateAsync 方法

定義

多載

CreateAsync(IRandomAccessStream)

以非同步方式建立新的 BitmapDecoder ,並使用資料流程初始化它。

CreateAsync(Guid, IRandomAccessStream)

以非同步方式使用特定的位 圖編解碼器建立新的 BitmapDecoder ,並使用資料流程初始化它。

CreateAsync(IRandomAccessStream)

以非同步方式建立新的 BitmapDecoder ,並使用資料流程初始化它。

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)

參數

stream
IRandomAccessStream

包含要解碼之影像檔案的資料流程。

傳回

物件,管理新 BitmapDecoder的非同步建立。

屬性

備註

Windows.Graphics.Imaging 會自動判斷正確的點陣圖解碼器來解碼資料流程。

另請參閱

適用於

CreateAsync(Guid, IRandomAccessStream)

以非同步方式使用特定的位 圖編解碼器建立新的 BitmapDecoder ,並使用資料流程初始化它。

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)

參數

decoderId
Guid

Platform::Guid

winrt::guid

指定之點陣圖編解碼器的唯一識別碼。

stream
IRandomAccessStream

包含要解碼之影像檔案的資料流程。

傳回

物件,管理新 BitmapDecoder的非同步建立。

屬性

備註

此方法可讓應用程式明確選取要使用的點陣圖解碼器,並略過任何自動編解碼器仲裁。 內建解碼器的唯一識別碼可在 BitmapDecoder上作為屬性使用。 此外,您可以使用 GetDecoderInformationEnumerator 方法來取得任何已安裝解碼器的唯一識別碼。

另請參閱

適用於