Direct2d: convert a bitmap to a matrix

SuperSéhane 1 Reputation point
2021-10-30T13:32:19.787+00:00

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 - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
1,902 questions
No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Castorix31 65,876 Reputation points
    2021-10-30T17:00:15.593+00:00

    Use Direct2D effects

    like : Color matrix effect

    No comments

  2. Xiaopo Yang - MSFT 5,851 Reputation points Microsoft Employee
    2021-11-01T08:05:21.377+00:00

    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

    No comments