Silverlight 4 BitmapImage-BMP文件支持 [英] Silverlight 4 BitmapImage - bmp file support

查看:90
本文介绍了Silverlight 4 BitmapImage-BMP文件支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MSDN提到了对PNG和JPG的支持,但是许多人正在尝试setSource(file.bmp)并抱怨灾难性故障".

MSDN mentions support for PNG and JPG, but many people are trying setSource(file.bmp) and complaining about "Catastrophic failures".

有人可以澄清这一点吗,是否支持bmp?

Can someone clarify this, is bmp supported or not ?

如果没有,在Silverlight中显示bmp的最佳方法是什么?

And if not, what is the best way for displaying a bmp in silverlight ?

推荐答案

BMP. BMP是一种非常古老且效率不高的格式(与PNG和JPG相比),因此他们没有费心去支持它.

BMP is not supported in Silverlight. BMP is a very old and not a very efficient format (compared with PNG & JPG) so they have not bothered to support it.

Silverlight仅支持JPG& PNG格式的图片.

Silverlight only supports JPG & PNG format images.

显示它们的最佳方法是在Web服务器上对其进行转换,以便可以将它们用作PNG. Web服务器将有权访问足够的.Net库,从而可以轻松进行BMP => PNG转换.我不会在客户端创建BMP加载器.

The best way to display them is to convert them on the web server so they can be served up as PNGs. The webserver will have access to enough .Net libraries that BMP=>PNG conversion will be easy. I would not bother to create a BMP loader client-side.

这篇关于Silverlight 4 BitmapImage-BMP文件支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆