问题
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