Solved How do i display images
#1
Photo 
Hello,

for my new plugin I try to add the ability to display screenshots and artworks, like a picture add-on.

What I tried so far:
  • display image from web or local storage with setResolvedUrl()
  • display image from web or local storage with xbmc.Player().play()
  • display image from web or local storage without callback and pass direct path with xbmcplugin.addDirectoryItem() as suggested here
None of this worked.

The debug log states it uses ff-mjpeg codec and duration is 00:00:00.04. Does it show the image for only 40 milliseconds?
How do I display an image properly? I saw other picture add-ons implementing a custom GUI for this purpose.

Debug log: https://gist.github.com/MrKrabat/0008139...255ad6d59f
Reply
#2
@MrKrabat

Please read the red bold text above the 'Post Reply' button when you post a message on this forum. It is there for a reason. Thank you.
Reply
#3
Here an example to display a single image in full screen.

python:
log_debug('Rendering FS fanart "{0}"'.format(m_assets['fanart']))
xbmc.executebuiltin('ShowPicture("{0}")'.format(m_assets['fanart']))

And here an example to show a group of images located in a directory

python:
log_debug('Rendering images in "{0}"'.format(img_dir_FN.getPath()))
xbmc.executebuiltin('SlideShow("{0}",pause)'.format(img_dir_FN.getPath()))

Read this comment in AML source code about how you have to escape the directory name.
Reply
#4
(2018-06-09, 15:29)Wintermute0110 Wrote: Here an example to display a single image in full screen.

python:
log_debug('Rendering FS fanart "{0}"'.format(m_assets['fanart']))
xbmc.executebuiltin('ShowPicture("{0}")'.format(m_assets['fanart']))

And here an example to show a group of images located in a directory

python:
log_debug('Rendering images in "{0}"'.format(img_dir_FN.getPath()))
xbmc.executebuiltin('SlideShow("{0}",pause)'.format(img_dir_FN.getPath()))

Read this comment in AML source code about how you have to escape the directory name.
Thank you very much, I already found this workaround and it is working Smile
Reply
#5
Thread marked solved.
Reply

Logout Mark Read Team Forum Stats Members Help
How do i display images0