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: 
gwerner
Visitor

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.
0 Kudos
6 REPLIES 6
RokuJoel
Binge Watcher

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
0 Kudos
TheEndless
Channel Surfer

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)
0 Kudos
EnTerr
Roku Guru

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?
0 Kudos
TheEndless
Channel Surfer

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)
0 Kudos
EnTerr
Roku Guru

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.
0 Kudos
TheEndless
Channel Surfer

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)
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.