View Full Version : counting the no. of pixels within a bounded area

02-25-2004, 07:46 AM
I am struggling with counting the no. of pixels manually within a bounded area of a .bmp file.
What I came up with is load a .bmp file, go through each pixel, identify the colour of them, save in an array and increase a counter by spotting a particular colour.
I think glReadPixel, glStorePixel and other methods should be applied. That's what I've got so far.
Any Genius can point me to a correct and clear direction, I'd be appreciated.

02-25-2004, 08:50 AM
Check out this link. I don't think this is supported in hardware on all platforms, though:

02-25-2004, 02:38 PM
thanks mate