无法将照片属性保存到照片文件。 [英] trouble saving photo properties to photo file.
本文介绍了无法将照片属性保存到照片文件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请帮忙!我无法将照片属性保存到照片文件。
以下是代码,
- StorageFolder photoFolder = KnownFolders.PicturesLibrary ; $
- StorageFile photoFile = await photoFolder.CreateFileAsync(" image.jpg");
- List< KeyValuePair< string,object>> data = new List< KeyValuePair< string,object>>();
- data.Add(new KeyValuePair< string,object>(" System.Photo.CameraManufacturer"," HELLO")) ;&NBSP; &NBSP; &NBSP;
- await photoFile.Properties.SavePropertiesAsync(data);
它编译得很好,但运行时错误"值不在预期范围内。"
谢谢。
< hr class ="sig">Jerry
解决方案
StorageFile.Properties是只读的。
http://msdn.microsoft.com/ EN-US /库/窗/应用/ windows.storage.storagefile.properties.aspx
Hi,
Please help! I have trouble saving photo properties to photo file.
Here is the code,
- StorageFolder photoFolder = KnownFolders.PicturesLibrary;
- StorageFile photoFile = await photoFolder.CreateFileAsync("image.jpg");
- List<KeyValuePair<string, object>> data = new List<KeyValuePair<string, object>>();
- data.Add(new KeyValuePair<string, object>("System.Photo.CameraManufacturer", "HELLO"));
- await photoFile.Properties.SavePropertiesAsync(data);
it compiled fine, but with runtime error "Value does not fall within the expected range."
Thank you.
Jerry
解决方案
StorageFile.Properties is read-only.
http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.storagefile.properties.aspx
这篇关于无法将照片属性保存到照片文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文