0

如果 Source 是 System.Windows.Interop.InteropBitmap 类型,如何设置 System.Windows.Controls.Image 的 Source?InteropBitmap 信息如下:

{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

谢谢

4

1 回答 1

1

看起来已经InteropBitmap继承ImageSource了。你应该可以myImage.Source = myInteropbitmap;吗?

参考:

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

InteropBitmap 到 BitmapImage

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

于 2011-03-28T10:20:25.260 回答