question

SuperShane-9555 avatar image
0 Votes"
SuperShane-9555 asked XiaopoYang-MSFT edited

Direct2d: convert a bitmap to a matrix

Hello.
I have a ID2D1Bitmap object, and I'd like to make operations on it that require an access to the matrix containing the colors of the points (like make a particulat pixel black, or double the intensity of a pixel). How do I do that?

windows-api
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Castorix31 avatar image
1 Vote"
Castorix31 answered

Use Direct2D effects

like : Color matrix effect


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

XiaopoYang-MSFT avatar image
0 Votes"
XiaopoYang-MSFT answered XiaopoYang-MSFT edited

Operate the pixels data in fours like array.
There are some ways which manipulate pixels you can refer to. How to Modify the Pixels of a Bitmap Source, Setting the Alpha Values of Individual Pixels, a related question

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.