Aracılığıyla paylaş


BitmapEncoder.CreateAsync Method

Definition

Overloads

CreateAsync(Guid, IRandomAccessStream)

Asynchronously creates a new BitmapEncoder.

CreateAsync(Guid, IRandomAccessStream, IIterable<KeyValuePair<String,BitmapTypedValue>>)

Asynchronously creates a new BitmapEncoder for the specified codec with the specified encoding options and initializes it on a stream.

CreateAsync(Guid, IRandomAccessStream)

Asynchronously creates a new BitmapEncoder.

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

Parameters

encoderId
Guid

Platform::Guid

winrt::guid

The unique identifier of the specified encoder.

stream
IRandomAccessStream

The output stream.

Returns

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

Attributes

Remarks

An application must always specify the encoderId in order to create a BitmapEncoder. The unique identifiers of the built-in encoders are available as properties on BitmapEncoder. In addition, the unique identifier of any installed encoder can be obtained by using the GetEncoderInformationEnumerator method.

BitmapEncoder expects that the output stream is empty. You can ensure that the stream is empty by setting its Size property to 0.

See also

Applies to

CreateAsync(Guid, IRandomAccessStream, IIterable<KeyValuePair<String,BitmapTypedValue>>)

Asynchronously creates a new BitmapEncoder for the specified codec with the specified encoding options and initializes it on a stream.

public:
 static IAsyncOperation<BitmapEncoder ^> ^ CreateAsync(Platform::Guid encoderId, IRandomAccessStream ^ stream, IIterable<IKeyValuePair<Platform::String ^, BitmapTypedValue ^> ^> ^ encodingOptions);
/// [Windows.Foundation.Metadata.Overload("CreateWithEncodingOptionsAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<BitmapEncoder> CreateAsync(winrt::guid const& encoderId, IRandomAccessStream const& stream, IIterable<IKeyValuePair<winrt::hstring, BitmapTypedValue const&>> const& encodingOptions);
[Windows.Foundation.Metadata.Overload("CreateWithEncodingOptionsAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<BitmapEncoder> CreateAsync(Guid encoderId, IRandomAccessStream stream, IEnumerable<KeyValuePair<string,BitmapTypedValue>> encodingOptions);
function createAsync(encoderId, stream, encodingOptions)
Public Shared Function CreateAsync (encoderId As Guid, stream As IRandomAccessStream, encodingOptions As IEnumerable(Of KeyValuePair(Of String, BitmapTypedValue))) As IAsyncOperation(Of BitmapEncoder)

Parameters

encoderId
Guid

Platform::Guid

winrt::guid

The unique identifier of the specified encoder.

stream
IRandomAccessStream

A stream representing where the image file is to be written.

encodingOptions

IIterable<IKeyValuePair<String,BitmapTypedValue>>

IEnumerable<KeyValuePair<String,BitmapTypedValue>>

IIterable<IKeyValuePair<Platform::String,BitmapTypedValue>>

IIterable<IKeyValuePair<winrt::hstring,BitmapTypedValue>>

A collection of key-value pairs containing one or more codec-specific encoding options and the desired values.

Returns

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

Attributes

See also

Applies to