Dynamic images from a URL

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
TonyG
Member
Posts: 94
Joined: Wed Jul 22, 2009 7:35 am

Dynamic images from a URL

Post by TonyG »

Hi Scott,
"Added support for loading dynamic images from a URL (e.g. http://path-to-image/image.png). This makes it convenient to display images in Software Remotes that are stored on a Webserver/Internet."
I know you have this working for the Kodi plugin (and it's put to very good use), but is it also available to use elsewhere? i.e for web images in panels

Thinking of a page of traffic cams (static images but regularly updated). As an example: http://public.highwaystrafficcameras.co ... 48648.html


Thanks,


Tony
ScottBot
Site Admin
Posts: 2787
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Dynamic images from a URL

Post by ScottBot »

Tony,

Yes it is :!:

It was a feature that was implemented for the Kodi plugin, but can be used anywhere. I don't think HTTPS image requests will work though.
Scott
TonyG
Member
Posts: 94
Joined: Wed Jul 22, 2009 7:35 am

Re: Dynamic images from a URL

Post by TonyG »

Thanks Scott,

Got it working last night. It helped when I changed image URL from the example I gave - it has a permission issue.

Another use I can think of is within the RSS script, for news article thumbnails. Will give it a go.

Thanks again,


Tony
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: Dynamic images from a URL

Post by Richard Naninck »

Lots of rss images are .gif although they are listed as .jpg. If you try to edit an image you can see the real container in the first few lines of code. HouseBot cannot display .gif images so if images don't show, it could be that HB does not support the file format.
TonyG
Member
Posts: 94
Joined: Wed Jul 22, 2009 7:35 am

Re: Dynamic images from a URL

Post by TonyG »

Thanks Richard, very useful!

Haven't cracked it yet, as the image lines are constructed differently to titles and descriptions in RSS. I was hoping to add another entry to the RSS script lines here:
SetPropertyValue sProperty & "Headline", .selectSingleNode("title").Text
SetPropertyValue sProperty & "Date", .selectSingleNode("pubDate").Text
SetPropertyValue sProperty & "Text", .selectSingleNode("description").Text

RSS news feed example:
<title>Boy Scout Leader Fought Off Bear With Hammer</title>
<description>Christopher Petronino is dragged into a cave by the black bear and trapped with the animal for 80 minutes before escaping.</description>

vs RSS image line example:

<media:thumbnail url="http://media.skynews.com/media/images/g ... -70x50.jpg" width="70" height="50"/>
Post Reply