getting the path of the stored image in windows phone

不问归期 提交于 2019-12-10 11:49:57

问题


I am storing the image into camera roll

library.SavePictureToCameraRoll(DateTime.Now.ToString() + ".jpg", e.ImageStream);

my Problem is How can i get the path of this image after storing this image.


回答1:


On WP8, SavePictureToCameraRoll returns a Picture object on which you can call the GetPath method (don't forget to add the using Microsoft.Xna.Framework.Media.PhoneExtensions;)

var picture = lib.SavePicture(string.Format("test.jpg"), ms);
var filePath = picture.GetPath();

Unfortunately, on WP7 there is no way to get the path, because SavePictureToCameraRoll doesn't return anything.



来源:https://stackoverflow.com/questions/18572931/getting-the-path-of-the-stored-image-in-windows-phone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!