
Romans_I_XVI
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2015
10:31 PM
Drawing entire screen to bitmap - bug?
Hi, I am just a little curious why this code works on my Roku 1 but not on my Roku 3?
It's basically a quick way of freezing the background, making it fuzzy, and the darkening it while you draw something else above it.
Let me know if you have any thoughts, much appreciated.
Romans I XVI
bm_fuzzy_background = CreateObject("roBitmap", {width: 854, height: 480, AlphaEnable: True})
bm_fuzzy_background.DrawObject(0, 0, m.screen)
bm_fuzzy_background.DrawObject(3, 0, m.screen, &HFFFFFF80)
bm_fuzzy_background.DrawObject(-3, 0, m.screen, &HFFFFFF80)
bm_fuzzy_background.DrawRect(0, 0, 854, 480, &h00000080)
It's basically a quick way of freezing the background, making it fuzzy, and the darkening it while you draw something else above it.
Let me know if you have any thoughts, much appreciated.
Romans I XVI
9 REPLIES 9

NewManLiving
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2015
11:44 PM
Re: Drawing entire screen to bitmap - bug?
Considering that roScreen implements the 2d interface you would think it would act similar to a bitmap. May have something to do with the devices support for open gl. Can't say for sure . If I recall correctly even if you create a region on the screen you can write to it and it clips properly but if you try to copy that region to a bitmap you get some kind of distorted monster. Would be nice if you could create your own screencopy consistently. After all the screenshot utility has no problem providing one.
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )

Romans_I_XVI
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2015
11:47 PM
Re: Drawing entire screen to bitmap - bug?
Yeah, that's what I was thinking too, something to do with the openGL. It's the only difference I can think of that would affect this.
It's sort of frustrating, I was so happy with how great it worked on my Roku 1. Then Roku 3 just gives me a black screen. :?
It's sort of frustrating, I was so happy with how great it worked on my Roku 1. Then Roku 3 just gives me a black screen. :?

Komag
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2015
04:06 AM
Re: Drawing entire screen to bitmap - bug?
- Could it have something to do with the resolution? Roku 3 only outputs HD, whereas Roku 1 does both HD and SD.
- Could your exact firmware versions be different, one box is more updated than the other?
- The AlphaEnable is probably the culprit though, as I've read that different models of Rokus throughout history handle that differently, and it may be more than just openGL differences.
- It's possible you'll have better luck with different arcane combinations of Region, Bitmap, and Screen.
- Could your exact firmware versions be different, one box is more updated than the other?
- The AlphaEnable is probably the culprit though, as I've read that different models of Rokus throughout history handle that differently, and it may be more than just openGL differences.
- It's possible you'll have better luck with different arcane combinations of Region, Bitmap, and Screen.
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2015
08:57 AM
Re: Drawing entire screen to bitmap - bug?
Troubleshoot it by simplifying. You are still doing too many things in the example, try to narrow it down.
For example, can you copy the roScreen to a separate roBitmap and then do the dim/blurring with that?
Try to track at which step does it break and not behave as expected.
For example, can you copy the roScreen to a separate roBitmap and then do the dim/blurring with that?
Try to track at which step does it break and not behave as expected.

Romans_I_XVI
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2015
09:04 AM
Re: Drawing entire screen to bitmap - bug?
I just posted the whole thing so you could see what I'm doing, but it fails with any attempt to draw roScreen to a bitmap.
Thanks for the tip but yeah, any attempt to draw roScreen to a bitmap results in a blank bitmap on my Roku 3. Works fine on my Roku 1. ¯\(°_°)/¯
Thanks for the tip but yeah, any attempt to draw roScreen to a bitmap results in a blank bitmap on my Roku 3. Works fine on my Roku 1. ¯\(°_°)/¯
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2015
09:09 AM
Re: Drawing entire screen to bitmap - bug?
Great, let's keep troubleshooting
- does it have to do something with the setting of AlphaEnable?
- does it have something to do with the size of the screen and of the bitmap (e.g. what if we change screen resolution in Settings or in createObject; or maybe the bitmap is "too small"; maybe it just ignores copy requests from bigger to smaller bitmap?)
- does it have to do something with the setting of AlphaEnable?
- does it have something to do with the size of the screen and of the bitmap (e.g. what if we change screen resolution in Settings or in createObject; or maybe the bitmap is "too small"; maybe it just ignores copy requests from bigger to smaller bitmap?)

Romans_I_XVI
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2015
10:07 AM
Re: Drawing entire screen to bitmap - bug?
Lol, think you share the same train of thought as me.
Tried both alpha settings and different sizes. No luck.
P.S. I've already settled with a suitable alternative so I don't really mind if it doesn't work. At this point the thread is more informational for other users.
Tried both alpha settings and different sizes. No luck.
P.S. I've already settled with a suitable alternative so I don't really mind if it doesn't work. At this point the thread is more informational for other users.

RokuJoel
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2015
11:17 AM
Re: Drawing entire screen to bitmap - bug?
Have you tried creating a Region from the roScreen and the bitmapt and using that to draw to your bitmap's region instead of drawing from the Screen to the bitmap directly?
- Joel
- Joel

Romans_I_XVI
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2015
11:30 AM
Re: Drawing entire screen to bitmap - bug?
Also not sure if this matters. I'm using dfSetupDisplayRegions() . Neither my main region that I'm drawing everything to nor my roScreen component will draw to a bitmap.
I can try to take a section and attempt to draw that region to a bitmap and see what happens.
I can try to take a section and attempt to draw that region to a bitmap and see what happens.