Your Digital Media Has Never Looked So Good

 
SrBIOS
Topic Author
Posts: 3
Joined: Sat Jan 12, 2019 7:01 am

Sizing a Poster from a larger image

Sat Jan 12, 2019 7:11 am

Hello,

I've been working on a project for a while, and I'm trying to use animation to fade between Posters.  That part works. 

I'm having problems properly sizing the Posters...

I test on HD, and on SD.  The HD works, but the scaling produces poor image quality.  In SD, the image is not scaled at all to the right size.

If I set the image to m.top.backgroundURI , scaling works perfectly. 

In SD....

        <Poster id="P1" translation="[0,0]" loadDisplayMode="scaleToFit" />

    di = CreateObject("roDeviceInfo")
    DS = di.GetDisplaySize()
    m.DisplaySize_h = DS["h"]
    m.DisplaySize_w = DS["w"]

    m.P1.height = m.DisplaySize_h
    m.P1.width = m.DisplaySize_w
    
    m.P1.uri = m.url
    
    print m.P1.height   ' 480
    print m.P1.width     ' 720

The image is smashed to the upper left...

If I set         <Poster id="P1" translation="[0,0]" loadDisplayMode="scaleToFit" width="1280" height="480" />
and not use the sizing code I added, the image is centered...

What am i doing wrong?  I have a small zip of the app available..

Thanks!
 
renojim
** Valued Community Member **
Posts: 3468
Joined: Mon Feb 15, 2010 1:35 pm

Re: Sizing a Poster from a larger image

Sat Jan 12, 2019 12:10 pm

Have you tried adding ui_resolutions=hd to your manifest?  You should be able to just design for HD and let the firmware handle scaling for other resolutions.

-JT
 
SrBIOS
Topic Author
Posts: 3
Joined: Sat Jan 12, 2019 7:01 am

Re: Sizing a Poster from a larger image

Mon Jan 14, 2019 9:41 am

Hello JT,

Yes, I have also tried fhd...

Here is my manafest file..

title=DS

major_version=1
minor_version=0
build_version=00000

mm_icon_focus_hd=pkg:/images/mm_icon_focus_hd.png
mm_icon_focus_sd=pkg:/images/mm_icon_focus_sd.png

splash_screen_sd=pkg:/images/splash_screen_sd.png
splash_screen_hd=pkg:/images/splash_screen_hd.png
splash_screen_fhd=pkg:/images/splash_screen_fhd.png

splash_color=#01A3E9
splash_min_time=1000

#ui_resolutions=sd,hd
ui_resolutions=sd,hd,fhd

#splash_rsg_optimization=1


If I don't set a size to Poster (in the tag, or programmatically), the image is full resolution, off the screen.  I've tried various [color=#000000]loadDisplayMode settings, too.

I'm just scratching my head.
[/color]
 
destruk
Posts: 2709
Joined: Sat Dec 18, 2010 4:58 pm

Re: Sizing a Poster from a larger image

Mon Jan 14, 2019 10:20 am

If you are specifying sd,hd,fhd then you'll have to handle all the resolutions yourself.  It's much easier to simply specify hd and treat every screen as 1280x720 for setup and let roku resize it for you automagically.
 
SrBIOS
Topic Author
Posts: 3
Joined: Sat Jan 12, 2019 7:01 am

Re: Sizing a Poster from a larger image

Mon Jan 14, 2019 10:58 am

Hello destruk, I'll give that a shot.  Thanks!
 
destruk
Posts: 2709
Joined: Sat Dec 18, 2010 4:58 pm

Re: Sizing a Poster from a larger image

Mon Jan 14, 2019 2:29 pm

It's the same thing renojim said, just a different way, so hopefully you understood. ;)
 
norcaljohnny
Posts: 99
Joined: Thu Apr 13, 2017 11:00 pm

Re: Sizing a Poster from a larger image

Tue Jan 22, 2019 11:57 pm

You must always have a width and height included to use to loadDisplayMode properly.

What you may want to do is something similar to this:


loadDisplayMode="scaleToFit"
width="1280" 'the actual width 
height="480" 'the actual width
loadWidth="690" 'the actual width you want to load 
loadHeight="240" 'the actual height you want to load

Who is online

Users browsing this forum: No registered users and 3 guests