2

I was wondering if it is possible to programmatically delete an image within the MediaLibrary. Currently I am using the CameraCaptureTask to capture an image and save, but I would like to be able to delete that image as well. Also, editing an image would be another consideration. Note, I am working with Windows Phone 8.

Matthew
  • 3,976
  • 15
  • 66
  • 130

1 Answers1

0

No, you can't programmatically delete images from the users Pictures MediaLibary.

"There is no way to delete any content from the user's library. Once you've saved a picture, the user will always have that picture unless they personally go delete it."
(Source Delete image from MediaLibrary.SavePictures).

If you need the ability to delete stored images you could store them in isolated storage and then have an option to publish them to the Media Library.

Daniel Ballinger
  • 13,187
  • 11
  • 69
  • 96
  • Well, I am in fact doing as you say with storing the images in IsolatedStorage, although upon the CameraCaptureTask completed event in Windows Phone 8, the image is also automatically saved to the MediaLibrary as well. I was hoping it would be possible to at least modify and resave an image in the MediaLibrary though, as well as remove the original image. – Matthew Jul 05 '13 at 19:12
  • nice answer, #have an option to publish them to the Media Library#,can you explain more about this? I didn't get detail document from MSDN. I need share my pictures that are on isolated storage to media library. – Sean Aug 19 '13 at 07:37
  • @Sean, Have a look at [Saving Image in MediaLibrary](http://stackoverflow.com/questions/8307382/saving-image-in-medialibrary?rq=1). If that doesn't help, try asking a seperate question. – Daniel Ballinger Aug 19 '13 at 09:13