![](/img/trans.png)
[英]Saving an image from the web to the Saved Pictures folder in Windows Phone 8.1 RT C#
[英]How to get Stream from ImageSource object for saving in Pictures Library? (Windows Phone 7, C#)
我有一个ImageSource
对象(或可能是一个BitmapImage
对象)。 我想使用MediaLibrary
类(XNA框架)的SavePicture
方法将其保存到图片库。 我怎样才能做到这一点? 提前致谢。
使用WritableBitmap并使用SaveJpeg
方法对位图进行编码,然后使用保存图像的流作为MediaLibrary的参数。 如果您正在使用MemoryStream
不要忘记将位置设置为0。
有关这方面的完整示例,请访问msdn, http://msdn.microsoft.com/en-us/library/ff769549 (VS.92) .aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.