Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
squirreltown
Level 9

color check

Would there be a way to ask the Roku what colors are currently drawn on the (ro) screen?
So if for instance, I wanted to determine that the color black "&hFF" didn't exist at any pixel location?


Thanks
Kinetics Screensavers
0 Kudos
3 Replies
belltown
Level 7

Re: color check

I haven't tried it yet, but maybe this will work if you want a single pixel:

pixelRGBAValue = bitmap.GetByteArray (x, y, 1, 1) [0]

Or get the whole array for the whole bitmap and examine each array element in turn to find if any color value appears anywhere in the bitmap.
https://github.com/belltown/
0 Kudos
squirreltown
Level 9

Re: color check

Thanks belltown, I'll see if that works.

edit:It seems to work, but of course its too slow to be really practical, duh! only 921,000 array entries to check!
         dooda = m.screen.GetByteArray(0, 0, 1280, 720)
for each color in dooda
if color = 0
return false
else
end if
end for
return true
Kinetics Screensavers
0 Kudos
Komag
Level 9

Re: color check

conjuring effective shortcuts is what we do, right? 8-)
0 Kudos