BitmapEncoder.CreateAsync(Guid, IRandomAccessStream) | createAsync(Guid, IRandomAccessStream) method

Applies to Windows and Windows Phone

Asynchronously creates a new BitmapEncoder.

Syntax


Windows.Graphics.Imaging.BitmapEncoder.createAsync(encoderId, stream).done( /* Your success and error handlers */ );

Parameters

encoderId

Type: String [JavaScript] | System.Guid [.NET] | Platform::Guid [C++]

The unique identifier of the specified encoder.

stream

Type: IRandomAccessStream

The output stream.

Return value

Type: IAsyncOperation<BitmapEncoder>

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

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.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Graphics.Imaging
Windows::Graphics::Imaging [C++]

Metadata

Windows.winmd

See also

BitmapEncoder
CreateAsync(Guid, IRandomAccessStream,IIterable(IKeyValuePair))

 

 

Show:
© 2014 Microsoft