如何将'System.Windows.Media.Imaging.BitmapImage'转换为'System.Drawing.Image'?

时间:2012-01-26 08:08:17

标签: c# wpf image c#-4.0 bitmapimage

我想将BitmapImage转换为System.Drawing.Image

这是我的BitmapImage

BitmapImage bmi = new BitmapImage(new Uri(someString, UriKind.Absolute));

现在,我如何从System.Drawing.Image创建bmi

1 个答案:

答案 0 :(得分:2)

MSDN为BitmapImageSystem.Drawing.Image之间的互操作提供了非常好的示例 - 请参阅http://blogs.msdn.com/b/rwlodarc/archive/2007/01/03/wpf-bitmapsource-and-gdi-bitmap-interop.aspx