ExifTool is a highly customizable Perl script that extracts meta information from JPG, TIFF, CRW, CR2, THM, NEF and GIF images. ExifTool can read EXIF, IPTC, XMP and GeoTIFF formatted data as well as the maker notes of many digital cameras from various manufacturers including Canon, Casio, FujiFilm, Minolta, Nikon, Olympus, Pentax, Sanyo and Sigma.
Currently, ExifTool supports Canon, Casio, FujiFilm, Minolta, Nikon, Olympus, Pentax, Sanyo and Sigma maker notes, but support for new types can easily be added by editing the ExifTool modules.
The ExifTool support modules are very readable. The format for these files is documented in Image/ExifTool/README.
If you make any useful new additions, e-mail me the file so I can add the functionality to the distributed version.
And do drop me a note if you find ExifTool useful. My e-mail address is in the README file. Thanks.
File Name 113_1366.JPG Camera Model Name Canon EOS DIGITAL REBEL Shooting Date/Time 2003:10:31 15:44:19 Shooting Mode Program AE Tv(Shutter Speed) 1/60 Av(Aperture Value) 5.6 Metering Mode Evaluative Exposure Compensation 0 ISO Speed 100 Lens 18.0 - 55.0mm Focal Length 55.0mm Image Size 2048x3072 Quality Normal Flash On Flash Type Built-In Flash Flash Exposure Compensation 0 Red Eye Reduction Off Shutter Curtain Sync 1st-curtain sync White Balance Auto Focus Mode AI Focus AF Contrast +1 Sharpness +1 Saturation +1 Color Tone Normal File Size 811KB Image Number 113-1366 Drive Mode Continuous shooting Owner's Name Phil Harvey Camera Body No. 0560012345
NAME exiftool - print meta information from image files SYNOPSIS exiftool [OPTIONS] [-TAG or --TAG ...] FILE ... DESCRIPTION Prints information for specified tags from listed files. -TAG specifies the name of a tag to extract, or --TAG to ignore. FILE may be an image file name, a directory name, or - for the standard input. Currently recognized file types are JPG, TIFF, GIF, THM, CRW, CR2 and NEF. OPTIONS -list - list all valid tag names -ver - print version number and exit -a - allow duplicate tag values (otherwise only last value displayed) -b - output requested data in binary format -d FMT - set date/time format (consult strftime manpage for FMT syntax) -e - print existing tags only -- don't calculate composite tags -f - force printing of tags even if their values are not found -g[#] - organize output by tag group (-g0 assumed if # not specified) -G[#] - same as -g but print group name for each tag -h - use HTML formatting for output -i DIR - ignore specified directory names -l - long output (2-line Canon-style output) -n - don't convert values for printing -o EXT - save output to file with EXT extension for each image processed -p FILE - print in format specified by file (ignores other format options) -r - recursively scan subdirectories (only useful if "file" is a dir) -s - short format (add up to 3 -s options for even shorter formats) -S - same as two -s options -t - output tab-delimited list of description/values (database import) -u - extract values of unknown tags (2 to extract from data blocks) -U - same as two -u options (also extract unknown from data blocks) -v - verbose messages (add up to 3 -v options for more verbose)The -g and -G options organize tags into different families of groups based on the specified family number. Currently three families of groups are defined:
Family Group Names 0 Canon, CanonCustom, CanonRaw, Casio, Composite, ExifIFD, ExifTool, File, FujiFilm, GPS, GeoTiff, IFD0, IFD1, IPTC, InteropIFD, MakerUnknown, Minolta, Nikon, Olympus, Pentax, Photoshop, PrintIM, Sanyo, Sigma, Sony, SubIFD, XMP 1 Composite, EXIF, ExifTool, File, GPS, GeoTiff, IPTC, MakerNotes, Photoshop, PrintIM, XMP 2 Author, Camera, ExifTool, Image, Location, Other, Printing, Time, Unknown
produces output like this
# this is a comment line File $FileName was created on $DateTimeOriginal (f/$Aperture, $ShutterSpeed sec, ISO $ISO)
File test.jpg was created on 2003:10:31 15:44:19 (f/5.6, 1/60 sec, ISO 100)
Note that some tag values may be returned as SCALAR references indicating binary data. The simple script above does not handle this case.
#!/usr/bin/perl -w use Image::ExifTool 'ImageInfo'; my $file = shift or die "Please specify filename"; my $info = ImageInfo($file); foreach (keys %$info) { print "$_ : $info->{$_}\n"; }
See the Image::ExifTool Documentation for more details.
ie) exiftool -filename -imagesize -flashexposurecomp image.jpg
Click here for a complete list of available tag names
Notes: Values will only be displayed for tags that exist in the specified file. Also note that some extra tags not listed above may be available from XMP records in the file.