Xenthalon Posted May 9, 2007 Share Posted May 9, 2007 I know it gives out the Pixelcolor and I am using it quite often in a program I am improving at the moment. I do about 180 PixelGetColors on the exact same image several times a second. I am using the autoit dll in my c++ script, and the program runs fine on my main computer here, but on my slower laptop this takes significantly more time. So what is PixelGetColor actually doing? Does it take a screenshot of the specified area (whole screen, window, client area) and then does one PixelGetColor on it? If this were the case I would have to write my own version which takes a screenshot once and then checks the colors. I suppose this would improve perfomance a lot. Or is it getting the color directly from the framebuffer from something like DirectX or your graphics card? Link to comment Share on other sites More sharing options...
spymoon Posted September 3, 2007 Share Posted September 3, 2007 (edited) calls Win API... GetPixel()Lar. Hi Lar im a newbie in AUtoit, so could you write an example of Dllcall for getpixel() API function?I'v try with these but i didnt sussceeded: $handle = WinGetHandle("wintitle")$hdc = DllCall("user32.dll","int","GetDC","hwnd",$handle)$result= DllCall ("gdi32.dll", "long", "GetPixel", "long", $dc, "long", $x, "long", $y) is that right?if you dont mind, please write an example to display color at the current mouse pos of an window applicationThanks N best regards Edited September 3, 2007 by spymoon Link to comment Share on other sites More sharing options...
Administrators Jon Posted September 3, 2007 Administrators Share Posted September 3, 2007 hdc = GetDC(NULL); int nCol = (int)GetPixel(hdc,relx,rely); GetDC(NULL) is a monstrously slow call - especially on Vista with Aero enabled. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Richard Robertson Posted September 4, 2007 Share Posted September 4, 2007 That's what you get for using Vista, Jon. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now