Jump to content

Pixelsearch Not a color


Recommended Posts

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.

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

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