Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

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

$
0
0
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)
Next
TrayTip("","x:"&$x&" y:"&$y,999)
Next
Next


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>