I have an instance of a System.Drawing.Bitmap
and would like to make it available to my WPF app in the form of a System.Windows.Media.Imaging.BitmapImage<
Thanks to Hallgrim, here is the code I ended up with:
ScreenCapture = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
bmp.GetHbitmap(),
IntPtr.Zero,
System.Windows.Int32Rect.Empty,
BitmapSizeOptions.FromWidthAndHeight(width, height));
I also ended up binding to a BitmapSource instead of a BitmapImage as in my original question