From aldeid
Jump to navigation Jump to search


ExifTool is a tool that manipulates meta information on pictures (reads, writes and edits meta information). The tool is also capable of retrieving thumbnails embedded in jpeg images. It supports a wide variety of metadata formats (EXIF, GPS, IPTC, XMP, JFIF, ...).

Exiftool is certainly the most complete tool that manipulates meta data on pictures.


Under Linux

From sources


This method installs the last available version of Exiftool (in the time of this writing, version 8.49). This is the recommended installation.


$ sudo apt-get install perl

Installation of Exiftool

$ cd /data/src/
$ wget http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-8.49.tar.gz
$ tar xvzf Image-ExifTool-8.49.tar.gz
$ cd Image-ExifTool-8.49/
$ sudo cp -R exiftool lib/ /usr/local/bin/

From packages

This method installs version 7.89.

$ sudo apt-get install libimage-exiftool-perl

Under Windows

Exiftool (CLI)

Download Exif from http://www.sno.phy.queensu.ca/~phil/exiftool/exiftool-8.49.zip, unzip and install.

Then rename "exiftool(-k).exe" to "exiftool.exe".


Download ExifToolGUI from http://freeweb.siol.net/hrastni3/foto/exif/exiftoolgui.zip.

Uncompress in the same directory where you have placed exiftool.



$ exiftool [OPTIONS] [-TAG...] [--TAG...] FILE...
$ exiftool [OPTIONS] -TAG[+-<]=[VALUE]... FILE...
$ exiftool [OPTIONS] -tagsFromFile SRCFILE [-SRCTAG[>DSTTAG]...] FILE...
$ exiftool [ -ver | -list[w|f|wf|g[NUM]|d|x] ]


Extract or exclude specified tag
Write new value for tag
Write tag value from contents of file
Copy tag value (see -tagsFromFile)
Read command-line arguments from file
-a, -duplicates
Allow duplicate tag names in output
-b, -binary
Output data in binary format
-c FMT, -coordFormat
Set format for GPS coordinates
-d FMT, -dateFormat
Set format for date/time values
-D, -decimal
Show tag ID numbers in decimal
-e, --composite
Do not calculate composite tags
-E, -escapeHTML
Escape special characters for HTML
-ee, -extractEmbedded
Extract information from embedded files
-ext EXT, -extension
Process files with specified extension
-f, -forcePrint
Force printing of all specified tags
-F[OFFSET], -fixBase
Fix the base for maker notes offsets
Increase speed for slow devices
-g[NUM...], -groupHeadings
Organize output by tag group
-G[NUM...], -groupNames
Print group name for each tag
-geotag TRKFILE
Geotag images from specified GPS log
-h, -htmlFormat
Use HMTL formatting for output
-H, -hex
Show tag ID number in hexadecimal
Generate HTML-format binary dump
-i DIR, -ignore
Ignore specified directory name
-if EXPR
Conditionally process files
-j, -json
Use JSON output format
-k, -pause
Pause before terminating
-l, -long
Use long 2-line output format
-L, -latin
Use Windows Latin1 encoding
-lang [LANG]
Set current language
List various exiftool attributes
-m, -ignoreMinorErrors
Ignore minor errors and warnings
-n, --printConv
Disable print conversion
-o OUTFILE, -out
Set output file or directory name
Overwrite original by renaming tmp file
Overwrite original by copying tmp file
-p FMTFILE, -printFormat
Print output in specified format
-P, -preserve
Preserve date/time of original file
-q, -quiet
Quiet processing
-r, -recurse
Recursively process subdirectories
-s, -short
Short output format
-S, -veryShort
Very short output format
Brute force XMP scan
-sep STR, -separator
Set separator string for list items
Use structured XML or JSON output
-t, -tab
Output in tab-delimited list format
-T, -table
Output in tabular format
-tagsFromFile SRCFILE
Copy tag values from file
-u, -unknown
Extract unknown tags
-U, -unknown2
Extract unknown binary tags too
-v[NUM], -verbose
Print verbose messages
Print version number and exit
-w EXT, -textOut
Write console output to file
-x TAG, -exclude
Exclude specified tag
-X, -xmlFormat
Use RDF/XML output format
-z, -zip'
Read/write compressed information
Define common arguments
Execute multiple commands on one line
-srcfile FMT
Set different source file name


Read Exif meta information

$ exiftool.exe CatsmokeingISgood.jpg
ExifTool Version Number         : 8.49
File Name                       : CatsmokeingISgood.jpg
Directory                       : .
File Size                       : 66 kB
File Modification Date/Time     : 2011:02:15 12:24:29+01:00
File Permissions                : rw-rw-rw-
File Type                       : JPEG
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Exif Byte Order                 : Big-endian (Motorola, MM)
Image Description               :
Make                            : NIKON CORPORATION
Camera Model Name               : NIKON D100
Orientation                     : Horizontal (normal)
X Resolution                    : 300
Y Resolution                    : 300
Resolution Unit                 : inches
Software                        : Adobe Photoshop 7.0
Modify Date                     : 2003:07:07 21:20:30
Y Cb Cr Positioning             : Co-sited
Exposure Time                   : 1/125
F Number                        : 9.0
Exposure Program                : Manual
Exif Version                    : 0220
Date/Time Original              : 2001:07:03 21:03:55
Create Date                     : 2001:07:03 21:03:55
Components Configuration        : Y, Cb, Cr, -
Compressed Bits Per Pixel       : 4
Exposure Compensation           : 0
Max Aperture Value              : 4.1
Metering Mode                   : Center-weighted average
Light Source                    : Unknown
Flash                           : No Flash
Focal Length                    : 60.0 mm
User Comment                    :
Sub Sec Time                    : 90
Sub Sec Time Original           : 90
Sub Sec Time Digitized          : 90
Flashpix Version                : 0100
Color Space                     : Uncalibrated
Exif Image Width                : 3008
Exif Image Height               : 2000
Related Sound File              :
Sensing Method                  : One-chip color area
File Source                     : Digital Camera
Scene Type                      : Directly photographed
CFA Pattern                     : [Green,Red][Blue,Green]
Custom Rendered                 : Normal
Exposure Mode                   : Manual
White Balance                   : Auto
Digital Zoom Ratio              : 1
Focal Length In 35mm Format     : 90 mm
Scene Capture Type              : Standard
Gain Control                    : None
Contrast                        : Normal
Saturation                      : Normal
Sharpness                       : Normal
Subject Distance Range          : Unknown
Compression                     : JPEG (old-style)
Thumbnail Offset                : 1016
Thumbnail Length                : 5539
Current IPTC Digest             : 540c4aedc4be816d04703ac16f5c865e
Application Record Version      : 2
Caption-Abstract                :
IPTC Digest                     : 540c4aedc4be816d04703ac16f5c865e
Displayed Units X               : inches
Displayed Units Y               : inches
Global Angle                    : 30
Global Altitude                 : 30
Copyright Flag                  : False
Photoshop Thumbnail             : (Binary data 5539 bytes, use -b option to extr
Photoshop Quality               : 12
Photoshop Format                : Standard
Progressive Scans               : 3 Scans
Image Width                     : 896
Image Height                    : 684
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Aperture                        : 9.0
Image Size                      : 896x684
Scale Factor To 35 mm Equivalent: 1.5
Shutter Speed                   : 1/125
Create Date                     : 2001:07:03 21:03:55.90
Date/Time Original              : 2001:07:03 21:03:55.90
Modify Date                     : 2003:07:07 21:20:30.90
Thumbnail Image                 : (Binary data 5539 bytes, use -b option to extract)
Circle Of Confusion             : 0.020 mm
Field Of View                   : 22.6 deg
Focal Length                    : 60.0 mm (35 mm equivalent: 90.0 mm)
Hyperfocal Distance             : 19.97 m

Embedded thumbnail in jpeg

Jpeg picture
Thumb picture disclosed

This example illustrates the dangers of leaving meta information on jpeg images. In this example, we use Exiftool to extract thumbnail embedded in a jpeg picture that has been cropped with Photoshop 7.

First download these pictures:

$ cd /data/tmp
$ wget http://hektik.org/Various/TheBad/cat/img/Cateyes.jpg
$ wget http://hektik.org/Various/TheBad/cat/img/CatsmokeingISgood.jpg

By using Exif, we will discover the *hidden* parts of these pictures (embedded thumbnails):

$ exiftool -b -ThumbnailImage Cateyes.jpg > Cateyes.thumb.jpg
$ exiftool -b -ThumbnailImage CatsmokeingISgood.jpg > CatsmokeingISgood.thumb.jpg

The tools is capable of embed the thumbnails back to the original pictures:

$ exiftool "-ThumbnailImage<=Cateyes.thumb.jpg" Cateyes.jpg
$ exiftool "-ThumbnailImage<=CatsmokeingISgood.thumb.jpg" CatsmokeingISgood.jpg