Sign in to follow this  
Followers 0
kyler

Pixelsearch Not a color

3 posts in this topic

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.

Share this post


Link to post
Share on other sites



#2 ·  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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0