Jump to content

Recommended Posts

Posted

Hey, I am trying to make a program that is able to determine what colors there are on top of a constant background color. The colors of the objects and number of objects varry. Whats the quickest way to do this? Something like pixelsearch(0,0,100,100,Not $color) is basically what i need. Thanks in advance.

Posted (edited)

Stick PixelGetColor in two nested for loops?

dim $results[100][2]
$resultcounter=0
for $x= 1 to 100
     for $y= 1 to 100
          If PixelGetColor($x,$y)<>$color Then 
             $resultcounter+=1
             $results[$resultcounter][0]=$x
             $results[$resultcounter][1]=$y
          Endif
     next
next

It will probably need some polishing, but that's it in a nutshell.

Edited by TurionAltec
Posted

ya thats the same thing i came up with. unfortunately, the real window size is much larger making that method too slow to really work well.

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
×
×
  • Create New...