
squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2015
03:23 PM
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
So if for instance, I wanted to determine that the color black "&hFF" didn't exist at any pixel location?
Thanks
Kinetics Screensavers
3 REPLIES 3
belltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2015
04:27 PM
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.
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.

squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2015
05:15 PM
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!
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

Komag
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2015
01:40 AM
Re: color check
conjuring effective shortcuts is what we do, right? 8-)