v17 Kodi 17 Raspberry Pi ControlImage Not Showing
#1
I have an issue where my ControlImage is not showing on Kodi 17 on Pis. It works on my Mac though so its hard to pinpoint if is a raspberry pi specific issue. My code looks like this.

Code:
##Create Window
__display_window__ = xbmcgui.Window(12005)

##Banner Image
url ='http://www.example.com/image.png'
__banner_image__ = xbmcgui.ControlImage(__display_window__.getWidth(), __display_window__.getHeight(), 500, 200, url)
__display_window__.addControl(__banner_image__)

##Example with text
__text_title__ = xbmcgui.ControlTextBox(0, __display_window__.getHeight() - 10, 1130, 50)
__display_window__.addControl(__text_title__)
__text_title__.setText( 'Watch at home on ' + name + '!!!' )
Does anyone have an idea of what this could be happening?
Reply
#2
First, the 1st two parameters of ControlImage constructor are X and Y pixel coordinates starting from the top left corner. You are trying to obtain Window width and height and using those values as starting coordinates, thus placing your ControlImage outside visible area.

Second, currently Window.getWidth/getHeiht return incorrect data - display resolution instead of Window's pixel sizes. I've fixed this problem but the fix will be available in Kodi 18 Leia. More info: https://github.com/xbmc/xbmc/pull/12279
Reply
#3
Then how would you figure the screen dimensions to align image or text at the bottom of the screen?
Reply
#4
(2017-07-28, 11:40)ddixon1987 Wrote: Then how would you figure the screen dimensions to align image or text at the bottom of the screen?

Until Kodi 18 Leya - by trial and error only, but it would work only in a specific skin, because different skin may have different pixel resolutions that may not correspond to standard TV resolutions. IIRC, Estuary is 1920x1200, for example.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi 17 Raspberry Pi ControlImage Not Showing0