rynop
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2016
02:03 PM
Ability to specify poster image height only
I have a screen graph app, and I want to display a logo where I want to only specify the height and let the roku compute the width preserving aspect ratio.
How can I do this? According to the docs I figured this would work but it is not:
How can I do this? According to the docs I figured this would work but it is not:
<Poster
id="headerLogo"
uri="pkg:/images/header-logo.png"
loadHeight="80"
loadDisplayMode="scaleToFill"
/>
3 REPLIES 3
joetesta
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2016
02:07 PM
Re: Ability to specify poster image height only
Did you try without "scaleToFill" ?
Try removing that or try some of the other "loadDisplayMode" options
distorting the image if the target screen element area has a different aspect ratio than the image
Try removing that or try some of the other "loadDisplayMode" options
aspiring
rynop
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2016
02:18 PM
Re: Ability to specify poster image height only
I ended up doing this:
I had to add a loadWidth, not sure why as it is totally ignored. Seems like a hack.
<Poster
loadHeight="80"
loadWidth="960"
loadDisplayMode="scaleToFit"
uri="pkg:/images/header-logo.png"
/>
I had to add a loadWidth, not sure why as it is totally ignored. Seems like a hack.

neoRiley
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2017
09:00 AM
Re: Ability to specify poster image height only
"rynop" wrote:
I ended up doing this:<Poster
loadHeight="80"
loadWidth="960"
loadDisplayMode="scaleToFit"
uri="pkg:/images/header-logo.png"
/>
I had to add a loadWidth, not sure why as it is totally ignored. Seems like a hack.
This magically worked for me as well. If the docs are telling the truth, then this is definitely a hack. It states very clearly "maintains aspect ratio", so that would indicate that width or heights counterpart does NOT need to be set. But setting it makes it work... 🙂