Closed abnersajr closed 1 year ago
When you save the image buffer with scan.SaveImage("image.png")
that is exactly what the script sees when it searches, so I would verify it's position using that image.
Also when you initialize the class the second param determines whether it uses window space or client space, by default it uses client which doesn't include the title bar.
I've tried on my end to replicate the issue but I don't see any problems currently, although I did notice that GetPixel returns the alpha channel which may cause issues, so I have updated the class to fix that function.
Trying to search for a pixel color in a region isn't showing me the right answer. Not sure if there is any offset or I'm not understanding correctly how It's positioned. I took a screenshot using gimp and trimmed the
23px
from the top bar. Then I selected the region, When I try to find the pixel in the specific region it doesn't match. Looks like there is a 8 pixels Y offset. Compared to the GetPixel function doesn't match. I made a small fn:The GetPixel returns as I see in Gimp.