|
Post by ratbirdmonger on Oct 1, 2020 22:38:06 GMT
Hi,
Is there a good way to get a 2d array of RGB values for a region on the screen? I have some custom algorithms that I want to use to detect shapes. They require arrays of pixels. I see there is a getColor API, I think repeatedly calling it pixel by pixel would be slow for a 100x100 region.
|
|
|
Post by AnkuLua on Oct 2, 2020 0:31:36 GMT
You can use snapshotColor() to take the color snapshot. Then getColor() will not take snapshot. It would be faster.
Don't forget set usePreviousSnap(false) to release the sanpshot.
|
|
|
Post by ratbirdmonger on Oct 8, 2020 1:39:48 GMT
I see, thanks. I assume it's very fast because it's reading in memory.
|
|