开发者

In WPF, how to Convert a D3DImage to Bitmap?

I开发者_如何学Python'm trying to paste images from an external source (Paint.NET in my test), but it gives a D3DImage which I don't know how to convert to Bitmap. How to do that?


A D3DImage, although it is a strange beast, is an ImageSource, so you can use as the Source for an Image and an Image is a Visual so you can use RenderTargetBitmap on it. There is sample code in the RenderTargetBitmap documentation that actually copies the bitmap from the Visual to another Image on same page:

  • RenderTargetBitmap Class
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜