Jump to content

What's faster, _WinAPI_GetPixel or _GDIPlus_BitmapGetPixel?


Go to solution Solved by JohnOne,

Recommended Posts

Posted (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 by DLXS
Posted

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!

Posted (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 by DLXS
Posted (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 by DLXS

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...