# Sizing a Poster from a larger image

**URL:** <https://forum.developer.roku.com/t/sizing-a-poster-from-a-larger-image/8839>\
**Category:** Archived\
**Tags:** roku-developer-program\
**Created:** [January 12, 2019, 2:11pm UTC](https://forum.developer.roku.com/t/sizing-a-poster-from-a-larger-image/8839 "2019-01-12T14:11:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![SrBIOS](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@SrBIOS](https://forum.developer.roku.com/u/SrBIOS)\
**Post date:** [January 12, 2019, 2:11pm UTC](https://forum.developer.roku.com/t/sizing-a-poster-from-a-larger-image/8839/1 "2019-01-12T14:11:48Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![renojim](https://avatars.discourse-cdn.com/v4/letter/r/ecae2f/32.png) [@renojim](https://forum.developer.roku.com/u/renojim)\
**Post date:** [January 12, 2019, 7:10pm UTC](https://forum.developer.roku.com/t/sizing-a-poster-from-a-larger-image/8839/2 "2019-01-12T19:10:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![SrBIOS](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@SrBIOS](https://forum.developer.roku.com/u/SrBIOS)\
**Post date:** [January 14, 2019, 4:41pm UTC](https://forum.developer.roku.com/t/sizing-a-poster-from-a-larger-image/8839/3 "2019-01-14T16:41:45Z")

</div>

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]

---

<div class="post-metadata">

**Author:** ![destruk](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@destruk](https://forum.developer.roku.com/u/destruk)\
**Post date:** [January 14, 2019, 5:20pm UTC](https://forum.developer.roku.com/t/sizing-a-poster-from-a-larger-image/8839/4 "2019-01-14T17:20:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![SrBIOS](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@SrBIOS](https://forum.developer.roku.com/u/SrBIOS)\
**Post date:** [January 14, 2019, 5:58pm UTC](https://forum.developer.roku.com/t/sizing-a-poster-from-a-larger-image/8839/5 "2019-01-14T17:58:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![destruk](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@destruk](https://forum.developer.roku.com/u/destruk)\
**Post date:** [January 14, 2019, 9:29pm UTC](https://forum.developer.roku.com/t/sizing-a-poster-from-a-larger-image/8839/6 "2019-01-14T21:29:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![norcaljohnny](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@norcaljohnny](https://forum.developer.roku.com/u/norcaljohnny)\
**Post date:** [January 23, 2019, 6:57am UTC](https://forum.developer.roku.com/t/sizing-a-poster-from-a-larger-image/8839/7 "2019-01-23T06:57:12Z")

</div>

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:

```auto
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

```
