I have an ImageSource object (or possibly a BitmapImage object). I want to save this to the Pictures Library, using the SavePicture method of MediaLibrary class (XNA framework). How can I achieve this?
Thanks in advance.
I have an ImageSource object (or possibly a BitmapImage object). I want to save
Share
Use a WritableBitmap and encode the bitmap with the
SaveJpegmethod, then use the stream you saved the image to as a parameter to MediaLibrary. Don’t forget to set the position to 0 if you’re using aMemoryStream.A full example of this is available at msdn, http://msdn.microsoft.com/en-us/library/ff769549(VS.92).aspx