Hye,
i m making a small app in windows phone 7, VS 2010.
I m using this code to save camera captured image in media library object.
but it is not saving.
byte[] imageBits = new byte[(int)e.ChosenPhoto.Length];
e.ChosenPhoto.Read(imageBits, 0, imageBits.Length);
e.ChosenPhoto.Seek(0, SeekOrigin.Begin);
MediaLibrary library = new MediaLibrary();
myMediaLibrary.SavePicture("TestPhoto", imageBits);
Also, i've tried to show the existing photos in media library.
it is also not working.
Uri url = new Uri(string.Format(@"Images/{0}", myMediaLibrary.SavedPictures[0]), UriKind.RelativeOrAbsolute);
imgsrc = new BitmapImage(url);
image1.Source = imgsrc;
image1.Visibility = System.Windows.Visibility.Visible;
(imgsrc is a ImageSource object, image1 is a image control,
myMediaLibrary is a MediaLibrary object)
1. where can i found this media library collection physically?
2. is there any way to edit it other than coding?
3. is there any way to clear the media library?