WPF: Image Source is System.Windows.Interop.InteropBitmap
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: 9开发者_高级运维6.0
DpiY: 96.0
Format: {Bgra32}
Height: 851.0
IsDownloading: false
Metadata: null
Palette: null
PixelHeight: 851
PixelWidth: 900
Width: 900.0
Thank you
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
精彩评论