View Full Version : Getting all the EXIF info from a command line?
Scottes
24th of February 2004 (Tue), 20:31
Does anyone know of a good util that will extract ALL of the EXIF data? The only one I've found so far is Exifer, but I would love to do this on the command line.
Windows command line, Linux/Unix, or Perl are all possibilities. Most of the ones I've tried give a LOT of "Unknown Data" even if they say they support the Maker-stuff from Canon. I'm kinda getting tired of writing Perl scripts just to watch them fail.
Anyone?
pix0r
24th of February 2004 (Tue), 22:17
Hey-
I've been meaning to learn about the possibilities of accessing EXIF data from the command line as well, so I just tried the Perl module Image::EXIF.
This simple perl script works fine (mostly taken from the CPAN Image::EXIF page)
#!/usr/bin/perl -w
use Image::EXIF;
use Data::Dumper;
my $image = $ARGV[0];
my $exif = new Image::EXIF($image);
my $all_info = $exif->get_all_info();
print $exif->error ? $exif->errstr : Dumper($all_info);
To install the necessary modules, do (as root):
perl -MCPAN -e shell
.. install Image::EXIF
.. install Data::Dumper
in case you don't already have the modules.
This gives me a bunch of information, including aperture/shutter, white balance, focal length, exposure bias, .... with my S45.
Hope this helps
4walls
25th of February 2004 (Wed), 17:21
Try this... http://www.sentex.net/~mwandel/jhead/
Scottes
26th of February 2004 (Thu), 22:05
jhead produces very little info. It outputs the most important stuff, but I wanted to dig into the details.
And Image::EXIF chokes on both my cygwin and ActiveState Perl builds on my Windows box. Bummer. I really don't want to copy 9 gigs of images to my Linux box.
Still looking....
But thanks, guys, I do appreciate the help.
iwatkins
27th of February 2004 (Fri), 04:21
Can't vouch for it, but this looks like it would do the job: http://www.hugsan.com/EXIFutils/
Cheers
Ian
Scottes
27th of February 2004 (Fri), 06:16
Thanks Ian. That does just about everything it seems.
It's not perfect - it spews some errors on every file (expected integer, got string), and has a number of "unknown field" entries. But it does display all the fields from what I can tell.
Thanks!
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.