I can store some EXIF properties into a jpg picture by the code below.
var propertyToSave = new List<KeyValuePair<string, object>>() {
new KeyValuePair<string, object>("System.Photo.LensManufacturer", "Canon") };
await file.Properties.SavePropertiesAsync(propertyToSave);
But actually some properties of EXIF listed here are read-only.
E.g. if trying to set a read-only property, "System.Photo.PeopleNames", an exception would be thrown.
// System.Photo.PeopleNames is a read-only property
var propertyToSave = new List<KeyValuePair<string, object>>() {
new KeyValuePair<string, object>("System.Photo.PeopleNames","Foo")
};
ps: The value, "Foo" may not be the correct value corresponding to the key, "System.Photo.PeopleNames". I just show an example.
My question, is there any way to know whether some file metadata are read-only ?
The documentation states which properties are read-only here:
http://msdn.microsoft.com/en-us/library/windows/desktop/ee872003(v=vs.85).aspx