pyexif reads the gps tags of jpgs
Switch branches/tags
Nothing to show
Clone or download
Latest commit 8a02e85 Oct 10, 2015

README.rst

PyEXIF

https://badge.fury.io/py/pyexif.png https://travis-ci.org/hanneshapke/pyexif.png?branch=master https://coveralls.io/repos/hanneshapke/pyexif/badge.svg?branch=master&service=github

Read EXIF from jpegs.

How to use the package

  • Install package
  • Run the following code
#!/usr/bin/python
"""Sample code to demonstrate pyexif"""
from pyexif.pyexif import Exif
file_name = “your_image.JPG"
result = Exif.load_image(file_name)
print ("The available attributes are: %s" % result.gps_attributes)
print ("Your location: %s %s" % result.lat, result.lon)

Further Readings

Exif specifications: http://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf

Thanks to

The works was inspired by erans: https://gist.github.com/erans/983821 Daniel Brown: http://www.endlesslycurious.com/2011/05/11/extracting-image-exif-data-with-python/