Re: [Gimp-user] [offtopic] image viewer which can show the location on a map

Here is a bash script that will take an image file and open a link in your browser to the site at that location.

It requires that the "exiftool" utility be installed, which you can install e.g. on debian-based systems with:

*sudo apt-get install libimage-exiftool-perl*

Put the following in a file (preferably in a location that is in your executable path), call it something like "locatepic".

**sensible-browser `exiftool -c "%.6f" $1 | grep "GPS Position" | sed -r 's/^.*: ([0-9]*\.[0-9]*) ([NS]), ([0-9]*\.[0-9]*) ([EW])/http:\/\/\/search?query=\1%20\2%2C%20\3%20\4/g'`*

(If your distribution doesn't have "sensible-browser" or you don't like which browser is used by it, you can use "xdg-open" in its place.)

Run this command one time:

*chmod ug+x locatepic* make the file executable. Then run it with:

locatepic /path/to/your/picture.jpg

(Or if the executable is not in your path, use /path/to/locatepic /path/to/your/picture.jpg)

There are various ways to integrate this into your desktop environment (e.g. so you can right-click on an image and choose "locatepic"), but I will leave that as an exercise to the reader. Some useful links:

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]