I am new to C# and learning to develop for Windows Phone 8. I am making an image editing app. Is there a way to save edited image in camera roll instead of saved pictures.
using PhotoChooserTask returns a PhotoResult.
private WriteableBitmap _imageBitmap = null;
private void Button_Click(object sender, RoutedEventArgs e)
{
PhotoChooserTask chooser = new PhotoChooserTask();
chooser.Completed += choosenImage;
chooser.Show();
}
private void choosenImage(object sender, PhotoResult e)
{
if (e.TaskResult != TaskResult.OK ) { return; }
_imageBitmap.SetSource(e.ChosenPhoto);
dummyImage.Source = _thumbImageBitmap;
//MediaLibrary library = new MediaLibrary();
//library.SavePictureToCameraRoll(String, Stream);
}
I want to save this PhotoResult(image) in the Camera Roll. I did a little bit of research and found
This method helps to
MediaLibrary.SavePictureToCameraRoll (String, Stream)
Save the specified image Stream as a Picture in the Windows Phone camera roll.
OR
MediaLibrary.SavePictureToCameraRoll (String, Byte[])
Save the specified byte array as a Picture in the Windows Phone camera roll.
How do I implement this method in my code?