gwerner
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2013
08:06 AM
Direct bimap access
Is there any possible way to access pixel data on bitmaps (maybe through the NDA-protected SDK)? I am making an app that has to generate real-time charts on an roScreen through bitmaps, but it seems I'm strictly limited to lines and boxes. Doesn't really bode well for pie charts, etc.
I'm also open to any "hacky" ways of doing this. Any hints would be appreciated.
I'm also open to any "hacky" ways of doing this. Any hints would be appreciated.
6 REPLIES 6

RokuJoel
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2013
11:14 AM
Re: Direct bimap access
I would think it should be possible to create pie charts on the newer firmware devices without that, using some ingenuity and DrawRotatedObject().
However:
ifDraw2d supports GetByteArray
GetByteArray(x as Integer, y as Integer, width as Integer, height as Integer) as Object
Returns an roByteArray representing the 32 bit RGBA pixel values for the rectangle described by the parameters
so if you really want to, you could probably iterate over that, write it to tmp:/using ifByteArray and read it back in as a new image file.
Also, you might look at LibRokuDev which has some png manipulation functions.
- Joel
However:
ifDraw2d supports GetByteArray
GetByteArray(x as Integer, y as Integer, width as Integer, height as Integer) as Object
Returns an roByteArray representing the 32 bit RGBA pixel values for the rectangle described by the parameters
so if you really want to, you could probably iterate over that, write it to tmp:/using ifByteArray and read it back in as a new image file.
Also, you might look at LibRokuDev which has some png manipulation functions.
- Joel

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2013
11:19 AM
Re: Direct bimap access
"RokuJoel" wrote:
so if you really want to, you could probably iterate over that, write it to tmp:/using ifByteArray and read it back in as a new image file.
Unfortunately, roBitmap won't read raw bitmaps (only PNG or JPG), so that wouldn't work. The ability to natively save an roBitmap as a png would be a very welcome feature. Doing so programmatically via Brightscript is far too slow to be practical.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2014
12:25 AM
Re: Direct biTmap access
"RokuJoel" wrote:
I would think it should be possible to create pie charts on the newer firmware devices without that, using some ingenuity and DrawRotatedObject().
Documentation says "Theta is currently limited to 0, 90, 180, and 270 degrees.", so won't work for pie slices (or other rotational objects). Unless that has changed, has it?

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2014
12:35 AM
Re: Direct biTmap access
"EnTerr" wrote:"RokuJoel" wrote:
I would think it should be possible to create pie charts on the newer firmware devices without that, using some ingenuity and DrawRotatedObject().
Documentation says "Theta is currently limited to 0, 90, 180, and 270 degrees.", so won't work for pie slices (or other rotational objects). Unless that has changed, has it?
It has for 5.X firmware devices, but not 3.X devices.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2014
12:51 AM
Re: Direct biTmap access
"TheEndless" wrote:"EnTerr" wrote:"RokuJoel" wrote:
I would think it should be possible to create pie charts on the newer firmware devices without that, using some ingenuity and DrawRotatedObject().
Documentation says "Theta is currently limited to 0, 90, 180, and 270 degrees.", so won't work for pie slices (or other rotational objects). Unless that has changed, has it?
It has for 5.X firmware devices, but not 3.X devices.
Pray tell more? And maybe someone will update docs too.

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2014
12:59 AM
Re: Direct biTmap access
"EnTerr" wrote:"TheEndless" wrote:"EnTerr" wrote:
Documentation says "Theta is currently limited to 0, 90, 180, and 270 degrees.", so won't work for pie slices (or other rotational objects). Unless that has changed, has it?
It has for 5.X firmware devices, but not 3.X devices.
Pray tell more? And maybe someone will update docs too.
As far as I'm aware, at some point in the late 4.X builds, they added the ability to specify any theta for DrawRotatedObject... not much else to tell, I don't think.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)