How would i get the colours and x,y positions of a bitmap with win32 programming?
How would i get the colours and x,y positions of a bitmap with win32 programming?
The easy way:
The fast way:Load bitmap using the "LoadImage()" function.
Associate its HBITMAP with a compatible HDC, via "CreateCompatibleDC()" & "SelectObject()".
Use "GetPixel()" to get the COLORREF value of a pixel.
There are other ways too.Load color info on an array by your own( have to know the basic of BMP format )
By finding the correct triplet, you'll have the RGB( or rather BGR ) values of that pixel.
Devoted my life to programming...