/pyexif

pyexif reads the gps tags of jpgs

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

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/