Jump to content
Sign in to follow this  

how create a cached image or matrix of color info, anything faster than PixelGetColor() ?

Recommended Posts

right now I have a script that I wrote that goes pixel by pixel using PixelGetColor() and then comparing the R, G, and B values. to find the pixel that has the highest values.

The script is working, but anytime I am working with an area of more than say 100x100 pixels the processing speed is just too slow.

It has to do with using PixelGetColor().

I was hoping somebody could drop a hint to me on what would be a more efficient method, like working with a cached image I am sure would be much quicker than working with the pixels displayed on the screen, or maybe there is a way to get pixel information for multiple pixels all at once.

Any hints or suggestions are greatly appreciated.

For $x = $L to $R;compare pixels RGB
For $y = $T to $B
$rgb = _ColorGetRGB("0x00"&Hex(PixelGetColor($x,$y),6))
For $i = 0 to UBound($rgb) - 1
If colorcheck($i) = 1 Then colorsave($x,$y)
TrayTip("","x:"&$x&" y:"&$y,999)
Edited by xekon

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...