Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert 'System.Windows.Media.Imaging.BitmapImage' to 'System.Drawing.Image'?

I would like to convert my BitmapImage to a System.Drawing.Image?

This is my BitmapImage:

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

Now, how would i create a System.Drawing.Image from my bmi?

like image 599
Willem Avatar asked Nov 04 '22 07:11

Willem


1 Answers

MSDN has a very good sample for interop between BitmapImage and System.Drawing.Image - see http://blogs.msdn.com/b/rwlodarc/archive/2007/01/03/wpf-bitmapsource-and-gdi-bitmap-interop.aspx

like image 165
Yahia Avatar answered Nov 07 '22 20:11

Yahia