开发者

Converting from Windows.Media.DrawingImage to Windows.Media.Imaging.BitMapImage or Windows.Media.ImageSource

Am having some trouble that i'm recieving an input from wpf that is of type Windows.Media.开发者_运维百科DrawingImage and I need to convert it to either windows.media.ImageSource or to windows.media.BitmapImage inorder for me to convert those into System.drawing.bitmap or System.drawing.image.

I have already searched extensively online, but could not find an answer. I would be very graeful if someone were to help me out

thank you!


Windows.Media.DrawingImage is itself an ImageSource so you can set this as a source to any Image class...

Here is an example .... http://msdn.microsoft.com/en-us/library/system.windows.media.drawingimage.aspx

So instead of Image you can use BitmapImage as well ... see this ...

http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/aad606b1-3f64-4314-a552-370afd361926/

Does this answer your question?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜