Background Image

How do I add just a background Image to my PosterScreen, I do not want the OverHang or anything else, kinda like they use the in the sample customvideoplayer app, I made the images, and tried adding the canvas parts from that app to mine but that breaks it, what is the most simplistic way to say background=“pkg:images/img.png”

Thanks

You’ll need to recreate the poster screen through roImageCanvas. While difficult, TheEndless did that on a few of his channels.

WOW .. ok .. I think I will use the overhang for now then lol .. at least until I get more familiar with the bright script … if TheEndless is reading the forums and wants to PM me an example I would not mind lol

Thanks Guys!

I’m just learning myself, but there is a custom background image on the “Custom Video Player” example in the SDK.

If you want to play around with the code…

  'Resolution-specific settings:
    mode = CreateObject("roDeviceInfo").GetDisplayMode()
    if mode = "720p"
        this.layout = {
            full:   this.canvas.GetCanvasRect()
            top:    { x:   0, y:   0, w:1280, h: 130 }
            left:   { x: 249, y: 177, w: 391, h: 291 }
            right:  { x: 700, y: 177, w: 350, h: 291 }
            bottom: { x: 249, y: 500, w: 780, h: 300 }
        }
        this.background = "pkg:/images/back-hd.jpg"
        this.headerfont = this.fonts.get("lmroman10 caps", 50, 50, false)
    else
        this.layout = {
            full:   this.canvas.GetCanvasRect()
            top:    { x:   0, y:   0, w: 720, h:  80 }
            left:   { x: 100, y: 100, w: 280, h: 210 }
            right:  { x: 400, y: 100, w: 220, h: 210 }
            bottom: { x: 100, y: 340, w: 520, h: 140 }
        }
        this.background = "pkg:/images/back-sd.jpg"
        this.headerfont = this.fonts.get("lmroman10 caps", 30, 50, false)
    end if

Thanks stitch1z, i had seen that as well and mentioned I tried to use that in my first post, but it broke my app. I am trying to get some clarity on it. Thanks for the help though.

My bad. I didn’t notice that when I read your OP. :oops:

“bobbydharrell” wrote:
WOW .. ok .. I think I will use the overhang for now then lol .. at least until I get more familiar with the bright script … if TheEndless is reading the forums and wants to PM me an example I would not mind lol

Thanks Guys!
I’m afraid I can’t really provide an example. I basically rewrote the entire roPosterScreen using the roImageCanvas, and it was a nightmare (you can see it in the screenshots of my SiriusXM channel: http://roku.permanence.com/#siriusxm). I definitely would not recommend it.

Thanks for the response! With the person who wrote it saying run away, I think I will take your advise and be happy with my logo lol

Thanks guys

I have decided to go with this method since to do a custom background would be out of my BrightScript understanding … hopefully this will be a feature they incorporate in future versions though.

Sub initTheme()

    app = CreateObject("roAppManager")
    theme = CreateObject("roAssociativeArray")

    theme.OverhangOffsetSD_X = "72"
    theme.OverhangOffsetSD_Y = "31"
    theme.OverhangSliceSD = "pkg:/images/Overhang_Background_SD.png"
    theme.OverhangLogoSD  = "pkg:/images/Overhang_Logo_SD.png"

    theme.OverhangOffsetHD_X = "125"
    theme.OverhangOffsetHD_Y = "35"
    theme.OverhangSliceHD = "pkg:/images/Overhang_Background_HD.png"
    theme.OverhangLogoHD  = "pkg:/images/Overhang_Logo_HD.png"

	theme.BackgroundColor = "#409DDE"

    app.SetTheme(theme)

End Sub