display image without writing to disk
#1
I'm writing a streaming script that shows thumbnails of the stream.
Right now, i'm downloading the thumbnail and then saving to disk before display.

Is there a way to display an image without having to write it to disk first?

Seems like i'd be able to just keep the image in memory to be displayed.

Thanks,
casey
Reply
#2
I was actually looking at doing something similar. Looking around I found that urllib.openurl(some_url) may do the trick.

If your getting the same image over an over again you may wish to download it for performance reasons and load it from disk though.
Reply
#3
I haven't figured out how to pass that as a parameter to ControlImage.setImage() to be displayed?

All i've got to work so far is to save that resut to disk, and then pass the file path to ControlImage.setImage(diskPath)

What I assumed I could do would be something like this :
response = urllib2.urlopen(url)
imageBytes = response.read()
controlImage.setImageBytes(imageBytes)

Thanks,
casey
Reply
#4
Ah ok, it doesn't look like the ControlImage object supports that.

P.S. What type of streaming script are you writing?
Reply
#5
Internet TV (beta) streams from Media Center Edition
http://www.brains-N-brawn.com/xMceItv/

updated to support thumbnails.
submitted to xbmcscripts a couple days ago.
Reply
#6
looks good!
Reply

Logout Mark Read Team Forum Stats Members Help
display image without writing to disk0