如何将BitmapImage转换为Icon?
在我的应用程序中,我必须将一个List
发送到我在WCF中的shell扩展。 这些MenuItem由图标和标签组成。 该图标的类型是System.Drawing.Icon
但我必须使用System.Windows.Media.Imaging.BitmapImage
。 有没有办法将BitmapImage
转换为Icon
?
我的想法:
首先将BitmapImage转换为Bitmap
将BitmapImage转换为Bitmap,反之亦然
然后另存为Icon
http://social.msdn.microsoft.com/forums/en-US/netfxbcl/thread/4a10d440-707f-48d7-865b-1d8804faf649/
希望这可以帮助!
我没有以这种方式创建图标,但也许你可以从图形到图标中受益。 然后你可以选择插值模式(也许可能很好)。 请参阅此处的示例: http : //www.dreamincode.net/code/snippet1684.htm