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: 
AJstream
Binge Watcher

How to adjust Image size on the channel?

Hi ,

I am using the free sample called "Multi-Live Channel" and I am trying to make the logos smaller and also the gray transparent bar that contains the logos shorter ,I tried changing the width and height for the poster and the label but that only reduced the quality of the images.

I would appreciate any help.

Here is the code inside:"RowListItems.xml"

<?xml version="1.0" encoding="UTF-8"?>

<!-- Copyright 2016 Roku Corp.  All Rights Reserved. -->

<component name="RowListItems" extends="Group" xsi:noNamespaceSchemaLocation="https://devtools.web.roku.com/schema/RokuSceneGraph.xsd">
	<interface>
		<field id = "itemContent" type = "node" onChange = "itemContentChanged" />
		<field id = "height" type = "float" onChange= "updateLayout" />
		<field id = "width" type = "float" onChange = "updateLayout" />
	</interface>

	<script type = "text/brightscript">
		<![CDATA[
			Sub init()
				m.Poster = m.top.findNode("poster")
				m.Label = m.top.findNode("label")
				m.Label.font.size = "40"
			End Sub

			Sub itemContentChanged()
				m.Poster.uri = m.top.itemContent.HDPosterUrl
				m.Label.text = m.top.itemContent.Title
				updateLayout()
			End Sub

			Sub updateLayout()
				if m.top.height > 0 and m.top.width > 0
					m.Poster.width = m.top.width
					m.Poster.height = m.top.height
					m.Label.translation = [0, m.Poster.height +30]
					m.Label.width = m.Poster.width
				end if
			End Sub

		]]>
	</script>

	<children>
	<!-- Aspect ratio for thumbnails is 16:9 -->
			<Poster
			id = "poster"
			height = "90"
			width = "160"
			loadWidth = "160"
			loadHeight = "90"
			loadDisplayMode = "scaleToFit">
			<Label
				id = "label"
				height = "20"
				width = "160"
				horizAlign = "center"
				color = "#f57b0a"
				font = "font:SmallBoldSystemFont"
			/>
		</Poster>
	</children>
</component>

 

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.