Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
squirreltown
Roku Guru

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 3
belltown
Roku Guru

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.
0 Kudos
squirreltown
Roku Guru

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
Roku Guru

Re: color check

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