Large Image Control

From DevWiki

Jump to: navigation, search

Applications,Boxee GUI API,Controls



The large image control utilizes a background loading thread to load images. It is particularly useful for background images such as fanart. You can choose the position, size, transparency and contents of the image to be displayed. The large image control is the only image control that allows you to use an actual http address for the image. Boxee will load the image in the background and display it within the control as normal.


  1. <control type="largeimage" id="300">
  2.    <description>My first largeimage control</description>
  3.    <posx>80</posx>
  4.    <posy>60</posy>
  5.    <width>250</width>
  6.    <height>200</height>
  7.    <visible>true</visible>
  8.    <colordiffuse>FFFFFFFF</colordiffuse>
  9.    <fadetime>200</fadetime>
  10.    <texture border="5" flipY="true" flipX="false">myimage.png</texture>
  11.    <aspectratio>keep</aspectratio>
  12. </control>

Available Tags

In addition to the Default Control Properties the following tags are available. Note that all XML tags are in lower case.

Element Description Required
texture Specifies the image file which will be displayed. It can be a texture file from the media folder or using $INFO also a GUI information. Yes, if info is not specified.
info Specifies the information showed in the image taken from GUI information. Yes, if texture is not specified.
bordertexture Specifies the image file which should be displayed as a border around the image. Use the <bordersize> to specify the size of the border. The <width>,<height> box specifies the size of the image plus border. No
bordersize Specifies the size of the border. A single number specifies the border should be the same size all the way around the image, whereas a comma separated list of 4 values indicates left,right,top,bottom values. No
aspectratio This specifies how the image will be drawn inside the box defined by <width> and <height>. See below for more info on aspect ratio. No
fadetime This specifies a crossfade time that will be used whenever the <texture> filename changes. The previous image will be held until the new image is ready, and then they will be crossfaded. No

Aspect Ratio

Python Integration

Represents an image control in the user interface.

  1. image = mc.GetWindow(14000).GetImage(3900)
  1. <onclick lang="python"><![CDATA[
  2. image = mc.GetWindow(14000).GetImage(3900)
  3. ]]></onclick>


Set the texture of the image by specifying the full path where the image resides. Should be a local file only. Supported formats: PNG, GIF, JPG.

  1. path = mc.GetApp().GetAppMediaDir() + "/image.png"
  2. image.SetTexture(path)
Personal tools