Satti
Satti

Reputation: 559

getting the path of the stored image in windows phone

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.

Upvotes: 0

Views: 919

Answers (1)

Olivier Payen
Olivier Payen

Reputation: 15268

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.

Upvotes: 4

Related Questions