To get the image-specific properties, you need to call GetImagePropertiesAsync. The returned ImageProperties object exposes members that contain basic image metadata fields.
If you want to access a larger set of file metadata, you need to use the ImageProperties.RetrievePropertiesAsync method. Please see Image Metadata
for more information.
The following is a simple code sample:
FileOpenPicker fileOpenPicker = new FileOpenPicker();
fileOpenPicker.FileTypeFilter.Add(".jpg");
fileOpenPicker.FileTypeFilter.Add(".png");
fileOpenPicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary;
StorageFile imageFile = await fileOpenPicker.PickSingleFileAsync();
if (imageFile != null)
{
ImageProperties props = await imageFile.Properties.GetImagePropertiesAsync();
var requests = new System.Collections.Generic.List<string>();
requests.Add("System.Photo.EXIFVersion");
IDictionary<string, object> retrievedProps = await props.RetrievePropertiesAsync(requests);
if (retrievedProps.ContainsKey("System.Photo.EXIFVersion"))
{
var exifVersion = (string)retrievedProps["System.Photo.EXIFVersion"];
}
}
Please note:
For a complete list of Windows Properties, including the identifiers and type for each property, see Windows Properties.
Some properties are only supported for certain file containers and image codecs. For a listing of the image metadata supported for each image type, see Photo Metadata Policies.
Because properties that are unsupported may return a null value when retrieved, always check for null before using a returned metadata value.