문제

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

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top