加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

Windows Phone 8,如何将图像转换为.png?

发布时间:2020-12-14 05:27:23 所属栏目:Windows 来源:网络整理
导读:对于 Windows Phone 8(我假设它与Windows 8类似),如何将他们获得的任何图像转换为.png? 例如,我得到.jpeg或.gif并将其转换为.png. 也有兴趣将.png转换为.jpeg. 在第三方应用程序之前,我更喜欢内置方法. 谢谢! 解决方法 WP7 / WP8中没有内置功能可以从JPG转
对于 Windows Phone 8(我假设它与Windows 8类似),如何将他们获得的任何图像转换为.png?

例如,我得到.jpeg或.gif并将其转换为.png.

也有兴趣将.png转换为.jpeg.

在第三方应用程序之前,我更喜欢内置方法.

谢谢!

解决方法

WP7 / WP8中没有内置功能可以从JPG转换为PNG.

如果只需要将WriteableBitmap保存为JPEG,则可以使用一个好的第三方框架.

var myBitmap = new WriteableBitmap(tempBitmap);

// Create the destitnation stream.
var pngDest = new System.IO.IsolatedStorage.IsolatedStorageFileStream("test.png",FileMode.Create,isoStore);

// use the WriteableBitmap extension to write out the PNG
myBitmap.WritePNG(pngDest);

如果您需要功能更全面的工具集(例如加载JPG),请查看WriteableBitmapEx和Rene Schulte @ Convert,Encode And Decode Silverlight WriteableBitmap Data的精彩文章

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读