DLXS Posted April 5, 2014 Posted April 5, 2014 (edited) Hi, I can't make winapi_getpixel to work so I'm wondering if it's worth it: I wanted to compare both options mentioned in the title to check which one is faster and implement that one. However, as can't make winapigetpixel to work, I can't compare them. Do anyone know which one is faster? WinapiGetPixel is based on gdi32 and the other one is GDIPlus, so I assume second option is faster, but I would like to know for sure. The aim of this is to get one (or a few) pixels to compare them with the colours I'm expecting in those pixels. Thanks a lot!!! Edited April 6, 2014 by DLXS
DLXS Posted April 5, 2014 Author Posted April 5, 2014 Hello again, After checking it properly, for my needs both functions are superfast, scarcely fewish msecs in the worst case escenario so it doesn't really matter which one is faster. My suggestion, if somebody reads this some day, is that _GDIPlus_BitmapGetPixel is probably faster. However, this moves my bottle neck to windowsactivate, if anybody wants to help, here's the link: '?do=embed' frameborder='0' data-embedContent>> Thanks a lot for reading!
JohnOne Posted April 5, 2014 Posted April 5, 2014 I'd hazard a guess that PixelGetColor is faster than both. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
DLXS Posted April 5, 2014 Author Posted April 5, 2014 (edited) Why do you think so? Shouldn't a dll call be faster as it skips some steps and uses native functions? For instance, winapi_showwindow is muuuch faster than winactivate. Edited April 5, 2014 by DLXS
Solution JohnOne Posted April 6, 2014 Solution Posted April 6, 2014 Because Winactivate does more and properly, winapi_showwindow is just part of that.And DllCall is also a native function. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
DLXS Posted April 6, 2014 Author Posted April 6, 2014 (edited) Thanks a lot! So basically, it's being optimized for this purpose Is there a way to know the differences or you gotta check the code? Edited April 6, 2014 by DLXS
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