Domanda

How can I do this? If I apply some d2d effect, then how can I retrieve pixel data from it? just point out its rgba value.. I already survey the all d2d api, but can't find some relative api. Thanks!!

È stato utile?

Soluzione

Direct2D does not provide the interfaces to manipulate pixels, but you can use WIC(Direct2D also use WIC to manipulate bitmaps) instead.

  1. Call ID2D1Factory::CreateWicBitmapRenderTarget to get the render target data, this function will return the IWICBitmap interface.
  2. Use Lock or CopyPixels methods from this interface to get the pixel data.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top