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

有帮助吗?

解决方案

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.
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top