开发者

How to get the EXIF or meta-data from images?

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 manufact开发者_如何转开发ures. 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


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


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.


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).


Take a look into exif_read_data() (PHP).


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?


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?-)


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.


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.


I wrote 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, however this is purely read-only.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜