exiftool Application Documentation

- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- EXAMPLES
- WRITING EXAMPLES
- PIPING EXAMPLES
- AUTHOR
- SEE ALSO

# NAME

exiftool - Read/write meta information in image files

# SYNOPSIS

exiftool [OPTIONS] [-TAG[[+-<]=[VALUE]] or --TAG...] FILE ...

# DESCRIPTION

A command-line interface to Image::ExifTool used for reading and writing meta information in image files. `FILE` may be an image file name, a directory name, or `-` for the standard input. Information is read from the specified file and output in readable form to the console (or written to an output text file with the `-w` option).

To write information in an image file, specify new values using either the `-TAG=[VALUE]` syntax or the `-AllTagsFromFile` option. This causes exiftool to rewrite `FILE` with the specified information, preserving the original file by renaming it to `FILE_original`. (Note: Be sure to verify that the new file is OK before erasing the original.)

Below is a list of meta information formats and file types supported by exiftool (r = read support, w = write support):

         Meta Information                   File Types
        ------------------          --------------------------
        EXIF           r/w          JPEG   r/w      NEF    r/w
        GPS            r/w          JP2    r        ORF    r
        IPTC           r/w          TIFF   r/w      PEF    r/w
        XMP            r/w          GIF    r/w
        MakerNotes     r/w          THM    r/w
        GeoTIFF        r            CRW    r/w
        ICC Profile    r            CR2    r/w
        Photoshop IRB  r            DNG    r/w
        PrintIM        r            MRW    r

# OPTIONS

Note: Case is not significant for any command-line option (including tag and group names), except for single-character options where the corresponding upper case option is defined.

-TAG
  Extract information for specified tag. See Image::ExifTool::TagNames for documentation on available tag names. The tag name may begin with an optional group name followed by a colon. (ie. `-TAG:GROUP`, where `GROUP` is any valid family 0 or 1 group name. Use the `-group` option to list valid group names.) If no tags are specified, all available information is extracted.

--TAG
  Exclude specified tag from extracted information. Same as the `-x` option.

-TAG[+-<]=[VALUE]
  Writes a new value for the specified tag, or deletes the tag if `VALUE` is not specified. Use `+=` to add a value to a list without replacing existing values, and `-=` to delete a specific value from a list. Use `<=` to set the value of a tag from the contents of a file with name `VALUE`. (Note: Quotes are required around the argument in this case to prevent shell redirection.)

  A special tag name of `All` may be used if no `VALUE` is specified to delete all meta information, or all information in a specified group with `-GROUP:All=` (for family 0 groups only). Note that within an image, some groups may be contained within others. These groups are also removed if the super group is deleted. Below are lists of these group dependencies:

        JPEG Image:
        - deleting EXIF also deletes MakerNotes, GPS and PrintIM
        - deleting Photoshop also deletes IPTC

        TIFF Image:
        - deleting EXIF also deletes MakerNotes

-a
  Allow duplicate tag names in the output (otherwise duplicates are suppressed).

-AllTagsFromFile SRCFILE
  Set the value of all writable tags from information in the specified source file. Note that the maker note information is set as a block, so it isn't effected like other information by subsequent tag assignments on the command line. For example, to copy all information but the thumbnail image, use `-ThumbnailImage=` after `-AllTagsFromFile` on the command line. Since the preview image is referenced from the maker notes and may be rather large, it is not copied. Instead, the preview image must be transferred separately if desired.

-b
  Output requested data in binary format. Mainly used for extracting embedded images. Suppresses output of tag names and descriptions.

-d FMT
  Set date/time format (consult `strftime` man page for FMT syntax).

-D
  Show tag ID number in Decimal.

-e
  Print existing tags only -- don't calculate composite tags.

-E
  Escape characters in output values for HTML (implied with the `-h` option).

-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
  Show tag ID number in Hexadecimal.

-group[#]
  List all tag groups for family #. Family 0 assumed if # not specified.

-h
  Use HTML formatting for output (implies `-E` option).

-i DIR
  Ignore specified directory name. May be multiple `-i` options.

-l
  Use long output format (2-line Canon-style output).

-L
  Convert Unicode characters in output to Windows Latin1 (cp1252) instead of the default UTF8.

-list
  List all valid tag names.

-listw
  List all writable tag names.

-m
  Ignore minor errors (allows writing if some minor errors occur, or extraction of embedded images that aren't in standard JPG format).

-n
  Do not apply the print conversion to displayed tag values, or the inverse print conversion to written tag values.

-o OUTFILE
  Set output file or directory name when writing information (otherwise the source file is renamed to `FILE_original` and the output file is `FILE`).

-p FMTFILE
  Print output in the format specified by the given file (and ignore other format options). Tag names in the format file begin with a `$` symbol and may contain an optional group name. Case is not significant. Lines beginning with `#` are ignored. For example, this format file:

          # this is a comment line
          File $FileName was created on $DateTimeOriginal
          (f/$Aperture, $ShutterSpeed sec, ISO $EXIF:ISO)

  produces output like this:

          File test.jpg was created on 2003:10:31 15:44:19
          (f/5.6, 1/60 sec, ISO 100)

-P
  Preserve date/time of original file when writing.

-r
  Recursively scan subdirectories (only meaningful if `FILE` is a directory name).

-s
  Use short output format (add up to 3 `-s` options for even shorter formats).

-S
  Print tag names instead of descriptions (very short format, same as two -s options).

-t
  Output a tab-delimited list of description/values (useful for database import).

-u
  Extract values of unknown tags (add another `-u` to also extract unknown information from binary data blocks).

-U
  Extract values of unknown tags as well as unknown information from binary data blocks (same as two `-u` options).

-v[#]
  Print verbose messages (# may be 1-4, higher is more verbose).

-ver
  Print version number and exit.

-w EXT
  Write console output to a file with name ending in `EXT` for each source file. The output file name is obtained by replacing the source file extension (including the `.`) with the specified extension.

-x TAG
  Exclude specified tag (may be many `-x` options). Same as `--TAG`.

-z
  Extract information from .gz and .bz2 compressed images.

# EXAMPLES

exiftool -g a.jpg
  Print all EXIF information sorted by group (for family 0).

exiftool -common dir
  Print common EXIF information for all images in `dir`.

exiftool -S -ImageSize -ExposureTime b.jpg
  Print ImageSize and ExposureTime tag names and values.

exiftool -l -canon c.jpg d.jpg
  Print standard Canon information from 2 image files.

exiftool -r -w .txt -common pictures
  Recursively save common EXIF information for files in `pictures` directory into files with the same names as the images but with a `.txt` extension.

exiftool -b -ThumbnailImage image.jpg > thumbnail.jpg
  Save thumbnail image from `image.jpg` to a file called `thumbnail.jpg`.

exiftool -b -JpgFromRaw -w _JFR.JPG -r .
  Recursively extract JPG image from all Canon RAW files in the current directory, adding '_JFR.JPG' for the name of the output JPG files.

exiftool -b -PreviewImage 118_1834.JPG > preview.jpg
  Extract preview image from JPG file and write it to `preview.jpg`.

exiftool -d '%r %a, %B %e, %Y' -DateTimeOriginal -S -s *.jpg
  Print formatted date/time for all JPG files in a directory.

exiftool -IFD1:XResolution -IFD1:YResolution
  Extract image resolution from IFD1.

# WRITING EXAMPLES

exiftool -comment='This is a new comment' dst.jpg
  Set comment in file (replaces any existing comment).

exiftool -comment= *.jpg
  Remove comment from all JPG files.

exiftool -keywords=EXIF -keywords=editor dst.jpg
  Replace existing keyword list with two new keywords (`EXIF` and `editor`).

exiftool -keywords+=word dst.jpg
  Add a keyword (`word`) to the current list of keywords.

exiftool -category-=xxx dir
  Delete only the specified category (`xxx`) from all files in directory.

exiftool -all= dst.jpg
  Delete all meta information from an image.

exiftool -photoshop:all= dst.jpg
  Delete Photoshop meta information from an image (note that the Photoshop information also includes IPTC).

exiftool -AllTagsFromFile src.crw dst.jpg
  Set the values of all writable tags from information in `src.crw`, and update `dst.jpg` with this new information.

exiftool -AllTagsFromFile a.jpg -XMP:All= -ThumbnailImage= -m b.jpg
  Copy all meta information from a.jpg to b.jpg except the thumbnail image and the XMP information.

exiftool '-ThumbnailImage<=thumb.jpg' dst.jpg
  Set the thumbnail image from specified file (Note: The quotes are neccessary to prevent shell redirection).

exiftool -xmp:city=Kingston dst.jpg
  Write a tag to the XMP group (otherwise in this case the tag would get written to the IPTC group since `City` exists in both, and IPTC has priority).

exiftool -Canon:ISO=100 dst.jpg
  Set `ISO` only in the Canon maker notes.

exiftool -LightSource-='Unknown (0)' dst.tiff
  Delete `LightSource` tag only if it is unknown with a value of 0.

exiftool -whitebalance-=auto -WhiteBalance=tung dst.jpg
  Set `WhiteBalance` to `Tungsten` only if it was previously `Auto`.

# PIPING EXAMPLES

cat a.jpg | exiftool -
  Extract information from stdin.

cat a.jpg | exiftool -iptc:keywords+=fantastic - > b.jpg
  Add an IPTC keyword in a pipeline, saving output to a new file.

# AUTHOR

Copyright 2003-2005, Phil Harvey

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

# SEE ALSO

Image::ExifTool, Image::ExifTool::TagNames, Image::ExifTool::Shortcuts

exiftool Application Documentation