How to get picture EXIF information from script?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Aardvark Offline
Member
Posts: 65
Joined: Sep 2010
Reputation: 0
Post: #1
I've hacked together a small google maps script which can overlay a zoomable map on a picture.

The only problem I have is how to get the pictures EXIF GPS data into the script? Currently I am starting the script on a keystroke from keyboard.xml, maybe I should start it in another way?

It it is really impossible I could implement this in C, but I have the feeling I'm overlooking some script API here which I could use to get info about the currently showing image...
find quote
Robotica Offline
Posting Freak
Posts: 1,202
Joined: Aug 2010
Reputation: 5
Post: #2
There already is an Addon (yes, I know: python) which scrapes EXIF-info. http://forum.xbmc.org/showthread.php?tid=80845

Maybe that can inspire you...
There also are some libs mentioned to use for scraping...
(This post was last modified: 2011-10-31 17:39 by Robotica.)
find quote
Robotica Offline
Posting Freak
Posts: 1,202
Joined: Aug 2010
Reputation: 5
Post: #3
Did you also check jhead: http://www.sentex.net/~mwandel/jhead/
find quote
Aardvark Offline
Member
Posts: 65
Joined: Sep 2010
Reputation: 0
Post: #4
Robotica Wrote:There already is an Addon (yes, I know: python) which scrapes EXIF-info.
...

Thanks (and for the second link), but this is not exactly what I meant. With these solutions I would be working outside XBMC.

If you are looking at a picture, XBMC already heas read the file, and all EXIF data is only a screen away. The most elegant is to get the GPS data from there. But currently I do not even know how to ask XBMC what image it is displaying!

The scraper addon would be a nice route if XBMC ever supported that natively, but anyway I do not consider scanning all data suitable for a quick slideshow from an temporily SD card. That is more akin to playing a DVD, you do not scrape that into the video library either.

Simpeler question to start with maybe: how do I even ask XBMC what image it is currently displaying?
find quote
Robotica Offline
Posting Freak
Posts: 1,202
Joined: Aug 2010
Reputation: 5
Post: #5
I made a general "picture viewing"-topic. Maybe you would like to join?
http://forum.xbmc.org/showthread.php?tid=113290
find quote