Pregunta

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!!

¿Fue útil?

Solución

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.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top