BitmapEncoder.CreateForTranscodingAsync(IRandomAccessStream, BitmapDecoder) BitmapEncoder.CreateForTranscodingAsync(IRandomAccessStream, BitmapDecoder) BitmapEncoder.CreateForTranscodingAsync(IRandomAccessStream, BitmapDecoder) BitmapEncoder.CreateForTranscodingAsync(IRandomAccessStream, BitmapDecoder) BitmapEncoder.CreateForTranscodingAsync(IRandomAccessStream, BitmapDecoder) Method

Definition

Asynchronously creates a new BitmapEncoder and initializes it using data from an existing BitmapDecoder.

public : static IAsyncOperation<BitmapEncoder> CreateForTranscodingAsync(IRandomAccessStream stream, BitmapDecoder bitmapDecoder)
static IAsyncOperation<BitmapEncoder> CreateForTranscodingAsync(IRandomAccessStream stream, BitmapDecoder bitmapDecoder) const;
public static IAsyncOperation<BitmapEncoder> CreateForTranscodingAsync(IRandomAccessStream stream, BitmapDecoder bitmapDecoder)
Public Shared Function CreateForTranscodingAsync(stream As IRandomAccessStream, bitmapDecoder As BitmapDecoder) As IAsyncOperation(Of BitmapEncoder)
Windows.Graphics.Imaging.BitmapEncoder.createForTranscodingAsync(stream, bitmapDecoder).done( /* Your success and error handlers */ );

Parameters

bitmapDecoder
BitmapDecoder BitmapDecoder BitmapDecoder

A BitmapDecoder containing the image data to be copied.

Returns

An object that manages the asynchronous creation of a new BitmapEncoder using data from an existing BitmapDecoder.

Remarks

Call this method when you want to edit some elements in an image but want to preserve the rest of the data intact. For example, if you want to write some metadata or properties but don't want to touch the image itself. When you create a BitmapEncoder using this method, it is initialized using data from the bitmapDecoder argument. Any data that you set on the encoder will overwrite the existing data, and all other data is preserved unchanged.

This method only allows you to create an encoder of the same image format as the decoder.

See also