I am writing a program that needs to get pixels from a window, and search for a certain range of pixel colors. I have been using getPixel, but that method is too slow for even 800x600. Does anyone know a different method/s? The window uses Direct X, if that helps...

Recommended Answers

All 2 Replies

Member Avatar

Try to use CreateDIBSection(). After that you are able to access the graphic bits directly which is way faster than GetPixel()

Thanks that looks like what I need. I am running Windows 7 and can't test it yet, but it seems like it will work.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.