BitmapProperties BitmapProperties BitmapProperties BitmapProperties 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// You can use this class in JavaScript.
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) GetPropertiesAsync(IIterable) GetPropertiesAsync(IIterable) GetPropertiesAsync(IIterable)

Asynchronously retrieves one or more bitmap properties.

public : IAsyncOperation<BitmapPropertySet> GetPropertiesAsync(IIterable<PlatForm::String> propertiesToRetrieve)public IAsyncOperation<BitmapPropertySet> GetPropertiesAsync(IEnumerable<String> propertiesToRetrieve)Public Function GetPropertiesAsync(propertiesToRetrieve As IEnumerable<String>) As IAsyncOperation( Of BitmapPropertySet )// You can use this method in JavaScript.
Parameters
propertiesToRetrieve
IIterable<PlatForm::String> IEnumerable<String> IEnumerable<String> IEnumerable<String>

A collection of strings containing the specified property keys.

Returns

Remarks

This method is identical to BitmapPropertiesView::GetPropertiesAsync.

SetPropertiesAsync(IIterable<>>) SetPropertiesAsync(IIterable<>>) SetPropertiesAsync(IIterable<>>) SetPropertiesAsync(IIterable<>>)

Asynchronously sets one or more bitmap properties.

public : IAsyncAction SetPropertiesAsync(IIterable<IKeyValuePair<PlatForm::String, BitmapTypedValue>> propertiesToSet)public IAsyncAction SetPropertiesAsync(IEnumerable<KeyValuePair<String, BitmapTypedValue>> propertiesToSet)Public Function SetPropertiesAsync(propertiesToSet As IEnumerable<KeyValuePair<String, BitmapTypedValue>>) As IAsyncAction// You can use this method in JavaScript.
Parameters
propertiesToSet
IIterable<IKeyValuePair<PlatForm::String, BitmapTypedValue>> IEnumerable<KeyValuePair<String, BitmapTypedValue>> IEnumerable<KeyValuePair<String, BitmapTypedValue>> IEnumerable<KeyValuePair<String, BitmapTypedValue>>

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.

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.