0

How to set the Source of System.Windows.Controls.Image if the Source is a type of System.Windows.Interop.InteropBitmap? InteropBitmap info below:

{System.Windows.Interop.InteropBitmap}
[System.Windows.Interop.InteropBitmap]: {System.Windows.Interop.InteropBitmap}
base {System.Windows.Media.ImageSource}: {System.Windows.Interop.InteropBitmap}
DpiX: 96.0
DpiY: 96.0
Format: {Bgra32}
Height: 851.0
IsDownloading: false
Metadata: null
Palette: null
PixelHeight: 851
PixelWidth: 900
Width: 900.0

Thank you

xscape
  • 3,318
  • 9
  • 45
  • 86

1 Answers1

1

It looks like InteropBitmap inherits from ImageSource already. You should be able to do myImage.Source = myInteropbitmap; ?

Ref:

http://msdn.microsoft.com/en-us/library/system.windows.interop.interopbitmap.aspx

InteropBitmap to BitmapImage

http://msdn.microsoft.com/en-us/library/system.windows.controls.image.source.aspx

Community
  • 1
  • 1
Kieren Johnstone
  • 41,277
  • 16
  • 94
  • 144