Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
lisakb140
Visitor

Trouble setting loadWidth and loadHeight on images

I'm new to Roku development so pardon my ignorance!

I recently submitted a channel for publishing, and got an error for exceeding texture memory, as I do have some very large images on my channel. I'm trying to make them smaller, both in their download size, and in how they are displayed.

In the xml file where they are set, I set their sizes as:


m.itemImage.loadWidth = 700
m.itemImage.loadHeight = 145
m.itemImage.Width = 700
m.itemImage.Height = 145


However, when I telnet to my channel and run loaded_textures, these specific images are still downloading as 1920x486, which is too big, and causing the error.

I also tried setting the loadDisplayMode to "scaleToFit", instead of "noScale", but that made no difference.

Is there anywhere else I should be looking, or anything else I should be doing to reduce the size of these images??

Any wisdom is greatly appreciated, thanks!

EDIT/UPDATE: I was setting the loadDisplayMode in the wrong place! I used
loadDisplayMode="limitSize"


and that IS reducing the download image size. However, the download size is 857x217, and not 700x145 (the loadWidth/loadHeight). I thought "limitSize" was supposed to bring the image in at exactly the dimensions specified in loadWidth/loadHeight. Why would the dimensions then be different?
0 Kudos
1 REPLY 1
norcaljohnny
Roku Guru

Re: Trouble setting loadWidth and loadHeight on images

I believe it should look more like this.. 

<poster
width = 1920
height = 486
loadWidth = 700
loadHeight = 145
loadDisplayMode = "scaleToFit => Fill  => or Zoom" />


You need to give actual width and height before load width and height, then loadDisplayMode.
0 Kudos