BitmapEncoder.CreateForInPlacePropertyEncodingAsync | createForInPlacePropertyEncodingAsync method

Applies to Windows and Windows Phone

Asynchronously creates a new BitmapEncoder for in-place property and metadata editing. The new encoder can only edit bitmap properties in-place and will fail for any other uses.


Windows.Graphics.Imaging.BitmapEncoder.createForInPlacePropertyEncodingAsync(bitmapDecoder).done( /* Your success and error handlers */ );



Type: BitmapDecoder

A BitmapDecoder containing the image data to be edited. This parameter must be created on a stream with an access mode of ReadWrite.

Note  The encoder writes to the stream that the original BitmapDecoder was created on. You can't specify an output stream.

Return value

Type: IAsyncOperation<BitmapEncoder>

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


Use this method to retrieve an encoder when you are only going to use it to edit or write a limited amount of properties to the image. An encoder retrieved this way can provide a performance advantage over an encoder returned by CreateForTranscodingAsync because it writes the new properties to empty padding space instead of encoding the entire image again.

Note  Here are several limitations to an encoder retrieved this way:

If an encoding operation fails for any reason, you will have to use CreateForTranscodingAsync to edit the metadata and re-encode the image. When you re-encode, you can also add new or additional padding to enable in-place property encoding in the future. To do this, create a new BitmapTypedValue with Type set to UInt32 and Value set to the number of bytes of padding you wish to add. A typical value is 4096 bytes. Set this metadata item on one or more of the metadata query locations in this table.

Metadata formatJPEG metadata queryTIFF, JPEG-XR metadata query



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]


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



See also




© 2014 Microsoft