my goal is to simply read RGB values from a pixel to compare them against other values.
While the 8bit colorpalette is working fine (0x00BBGGRR) I have difficulties to realize this with 10/12bit depth content.
Many areas are returning 0xFFFFFF as color which translates to white while the real displayed color is different.
=> If I turn off HDR while inside the application the picture becomes too bright which marks many areas as white
(as expected due to the lost color information which confirms that only 8bit RGB is supported from PixelGetColor()).
I understand that the builtin-Function PixelGetColor() only outputs 8bit-RGB values, so nothing to do here.
Another approach I tried was using builtin windows function with dllcall.
Using user32.dll and gdi32.dll functions I thought I should somehow retrieve the correct results:
Code: Select all
;Create device handle
dc:=DllCall("user32\GetDC", "int", 0)
;Retrieve Pixel from x and y coordinates
pixel:=dllcall("gdi32\GetPixel", "int", dc, "int", x, "int", y, "int")
There are some more advanced complex functions like BitBlt() but currently I don't know if it is worth the time to figure it out how it works since
it requires a bit copy operation to another handle and I don't want go down that rabbit hole where I need to write like 5 functions just to retrieve a color from a pixel.
Are there any simple ways to retrieve 10bit colors?
Greetings