locked
Copying DirectX offscreen drawing result into IWICBitmap

Answers

  • Hi, using an intermediate CPU_READ bitmap seems to be a good solution.. or maybe the IWICImageEncoder interface is able to convert your image.. or perform all your drawings without GPU acceleration (see CreateWicBitmapRenderTarget method).

    Wednesday, May 22, 2013 9:16 AM

All replies

  • Someone please reply!
    Monday, May 20, 2013 4:50 PM
  • How about the sample code in that thread?

    NEU_ShieldEdge

    Wednesday, May 22, 2013 6:39 AM
  • I am not sure which sample code are you talking about. The thread talks about creating an encoder for saving the file. This is fine to save, but to do further operations in memory should we encode and decode the image?

    Currently, I am creating another bitmap which can be read on CPU and then copying the data from render target to this bitmap using CopyFromRenderTarget. I then map that intermediate bitmap. Although, this approach works, I think there may be some efficient way to do this.

    Wednesday, May 22, 2013 6:44 AM
  • Hi, using an intermediate CPU_READ bitmap seems to be a good solution.. or maybe the IWICImageEncoder interface is able to convert your image.. or perform all your drawings without GPU acceleration (see CreateWicBitmapRenderTarget method).

    Wednesday, May 22, 2013 9:16 AM
  • Create WIC render target from wic bitmap, then draw the D2D bitmap to the render target.

    See CreateWicBitmapRenderTarget and ID2D1RenderTarget::DrawBitmap .


    Friday, April 25, 2014 2:15 AM