views:

401

answers:

9

I need a really good library or a command-line software that can be used to extract Exif data from images. No specific programming language, except the library or the software has to work really well.

I found various libraries for PHP and Python, but most of it hasn't been updated or being maintained and don't work for various manufactures. I wasted a lot of time just to find something that works.

Anyone knows what Flickr uses to get Exif data? Maybe that might answer the questions.

Thanks for any help

A: 

Did you not find that if PHP is compiled with --enable-exif that it will have an API for handling EXIF data? If you did find it, was hat one that doesn't do what you require?

Tony Miller
+2  A: 

The Gimp's Exif Viewer plugin uses libexif, which is written in C and seems to have been updated recently. Also, here is the EXIF standard itself, if you feel like rolling your own.

Brett Daniel
Can you use that command-line or it is GUI based?
Kunpha
libexif itself is just a C library for use in other programs. However, there appears to be a both a command-line wrapper http://libexif.sourceforge.net/man/exif.html and simple GUI EXIF viewer.
Brett Daniel
A: 

Have you checked this article and the modules pointed to from there? Given the standard nature of Exif, in theory, once you fully meet the standard there should be no need for further development, nor for manufacturer-specific tweaks, right?-)

Alex Martelli
A: 

Take a look into exif_read_data() (PHP).

Alix Axel
A: 

For perl, there is Image::ExifTool and Image::EXIF.

The first is used by the "exiftool", which is capable of reading lots of meta informations (also in other formats then exif) from images.

Tim Demkowsky
A: 

I wrote pexif (http://code.google.com/p/pexif/), which works pretty well for me. It is pure python, so should be easy to extend. It also lets you edit exif fields, (if you want, I wrote it to add GPS tags to my photos).

The major down side is that it has limited support for manufacturer tags, but I'm happy to add that support if I'm given example images that I can use for testing.

I've also written a JavaScript version (http://benno.id.au/blog/2009/12/30/html5-fileapi-jpegmeta), however this is purely read-only.

benno
+2  A: 

jhead is a great command-line EXIF utility; it can both read and write EXIF data. I was even updated recently (November 2009)!

You can download binaries for many different platforms (including Linux, Mac OS X and Windows).

EOL
A: 

Right this is what you want. http://www.sno.phy.queensu.ca/~phil/exiftool/ Gets what flickr does!

Richard Housham
A: 

You could take a look at exiv2. I used the command line version to bulk rename all my photos to include a timestamp in the filename.

Should be fairly straighforward to use from any scripting environment.

Bart Vandendriessche