Bitmap​Properties Bitmap​Properties Bitmap​Properties Class

Definition

Provides read and write access to image properties and metadata.

public sealed class BitmapProperties : IBitmapProperties, IBitmapPropertiesViewpublic sealed class BitmapProperties : IBitmapProperties, IBitmapPropertiesViewPublic NotInheritable Class BitmapProperties Implements IBitmapProperties, IBitmapPropertiesView
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

An instance of this class can represent one of the following:

  • The entire contents of the frame metadata.
  • The entire contents of the container level metadata.
  • A specific nested metadata block within the frame or container.

Methods

GetPropertiesAsync(IIterable<String>) GetPropertiesAsync(IIterable<String>) GetPropertiesAsync(IIterable<String>)

Asynchronously retrieves one or more bitmap properties.

public IAsyncOperation<BitmapPropertySet> GetPropertiesAsync(IIterable<String> propertiesToRetrieve)public IAsyncOperation<BitmapPropertySet> GetPropertiesAsync(IIterable<String> propertiesToRetrieve)Public Function GetPropertiesAsync(propertiesToRetrieve As IIterable<String>) As IAsyncOperation( Of BitmapPropertySet )
Parameters
propertiesToRetrieve

A collection of strings containing the specified property keys.

Returns

Object that manages the asynchronous retrieval of the bitmap properties.

Attributes

Remarks

This method is identical to BitmapPropertiesView::GetPropertiesAsync.

SetPropertiesAsync(IIterable<IKeyValuePair<String, BitmapTypedValue>>) SetPropertiesAsync(IIterable<IKeyValuePair<String, BitmapTypedValue>>) SetPropertiesAsync(IIterable<IKeyValuePair<String, BitmapTypedValue>>)

Asynchronously sets one or more bitmap properties.

public IAsyncAction SetPropertiesAsync(IIterable<IKeyValuePair<String, BitmapTypedValue>> propertiesToSet)public IAsyncAction SetPropertiesAsync(IIterable<IKeyValuePair<String, BitmapTypedValue>> propertiesToSet)Public Function SetPropertiesAsync(propertiesToSet As IIterable<IKeyValuePair<String, BitmapTypedValue>>) As IAsyncAction
Parameters
propertiesToSet

A collection of key-value pairs representing the bitmap properties to be set. Each key is a string containing the Windows property or metadata query, and the corresponding value is a BitmapTypedValue with the data and the correct PropertyType.

Returns

Object that manages the setting of the bitmap properties asynchronously.

Attributes

Remarks

Use a BitmapPropertySet to store metadata items that you want to set on the encoder. Each metadata item is a key-value pair.

The key is a string that identifies the metadata item to set. BitmapEncoder accepts some Windows properties as well as queries constructed using the WIC metadata query language. For a list of supported Windows properties, see Supported Windows Properties. For a summary of supported WIC metadata queries, see the WIC Native Image Format Metadata Queries topic.

The value is a BitmapTypedValue which allows you to associate the actual metadata value with an explicit data type (Windows.Foundation.PropertyType ).

Each image format has specific requirements around the type of every bitmap property, and you must ensure that the Type field of each BitmapTypedValue is correctly set for the selected property. For example, the System.Photo.Orientation Windows property is stored in the file as a UInt16, and therefore the Type field must be set to UInt16. For more info about Windows property types, see Photo Metadata Policies. For more info about Windows Imaging Component metadata query types, see Native Image Format Metadata Queries.