Silverlight 4 BitmapImage - bmp file support

旧城冷巷雨未停 提交于 2019-12-20 07:22:41

问题


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

Can someone clarify this, is bmp supported or not ?

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


回答1:


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 only supports JPG & PNG format images.

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.



来源:https://stackoverflow.com/questions/6719958/silverlight-4-bitmapimage-bmp-file-support

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!