Is it possible to use ImageProperties.SavePropertiesAsync() to change Exif tags?

Hong 1,046 Reputation points
2020-08-09T04:11:53.387+00:00

The following code to change an image file's orientation does not work for a UWP app:

ImageProperties imageProperties = await imageFile.Properties.GetImagePropertiesAsync();
List<KeyValuePair<string, object>> listProperties = new List<KeyValuePair<string, object>>();
listProperties.Add(new KeyValuePair<string, object>("Exif.Image.Orientation", 180));
await imageProperties.SavePropertiesAsync(listProperties);

It throws the exception: "The parameter is incorrect". Could anyone provide a tip on this?

Universal Windows Platform (UWP)
{count} votes