Sizing a Poster from a larger image

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…

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
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!

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

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 variouloadDisplayMode settings, too.

I’m just scratching my head.
[/color]

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.

Hello destruk, I’ll give that a shot. Thanks!

It’s the same thing renojim said, just a different way, so hopefully you understood. :wink:

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