diff --git a/man/man1/exiv2.1 b/man/man1/exiv2.1 index 5bd92cb8..fdd2ca47 100644 --- a/man/man1/exiv2.1 +++ b/man/man1/exiv2.1 @@ -1,1578 +1,3 @@ -.\" Hey, EMACS: -*- nroff -*- -.\" First parameter, NAME, should be all caps -.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection -.\" other parameters are allowed: see man(7), man(1) -.TH EXIV2 1 "August 26, 2021" -.\" Please adjust this date whenever revising the manpage. -.\" -.\" Some roff macros, for reference: -.\" .nh disable hyphenation -.\" .hy enable hyphenation -.\" .ad l left justify -.\" .ad b justify to both left and right margins -.\" .nf disable filling -.\" .fi enable filling -.\" .br insert line break -.\" .sp insert n+1 empty lines -.\" for manpage-specific macros, see man(7) -.SH NAME -exiv2 \- Image metadata manipulation tool -.SH SYNOPSIS -.B exiv2 -[\fIoptions\fP] [\fIaction\fP] \fIfile\fP ... -.br -.SH DESCRIPTION -.PP -.\" TeX users may be more comfortable with the \fB\fP and -.\" \fI\fP escape sequences to invoke bold face and italics, -.\" respectively. -.B exiv2 -is a program to read and write image metadata, including -Exif, IPTC, XMP, image comments, ICC Profile, thumbnails, image -previews and many vendor makernote tags. The program optionally -converts between Exif tags, IPTC datasets and XMP properties as -recommended by the Exif Standard, the IPTC Standard, the XMP -specification and the Metadata Working Group guidelines. -.br -The following image formats and metadata categories are supported: -.TS -lB lB lB lB lB lB lB -_ _ _ _ _ _ _ -l l l l l l l. -Type Exif IPTC XMP Image Comments ICC Profile Thumbnail -ARW Read Read Read - - Read -AVIF Read Read Read - - Read -BMP - - - - - - -CR2 Read/Write Read/Write Read/Write - Read/Write Read/Write -CR3 Read Read Read - Read Read -CRW Read/Write - - Read/Write - Read/Write -DNG Read/Write Read/Write Read/Write - Read/Write Read/Write -EPS - - Read/Write - - - -EXV Read/Write Read/Write Read/Write Read/Write Read/Write Read/Write -GIF - - - - - - -HEIC Read Read Read - - Read -HEIF Read Read Read - - Read -JP2 Read/Write Read/Write Read/Write - Read/Write Read/Write -JPEG Read/Write Read/Write Read/Write Read/Write Read/Write Read/Write -MRW Read Read Read - - Read -NEF Read/Write Read/Write Read/Write - Read/Write Read/Write -ORF Read/Write Read/Write Read/Write - - Read/Write -PEF Read/Write Read/Write Read/Write - Read/Write Read/Write -PGF Read/Write Read/Write Read/Write Read/Write Read/Write - -PNG - Read/Write Read/Write - Read/Write Read/Write -PSD Read/Write Read/Write Read/Write - - Read/Write -RAF Read Read Read - - Read -RW2 Read Read Read - - Read -SR2 Read Read Read - - Read -SRW Read/Write Read/Write Read/Write - - Read/Write -TGA - - - - - - -TIFF Read/Write Read/Write Read/Write - Read/Write Read/Write -WEBP Read/Write - Read/Write - Read/Write Read/Write -XMP - - Read/Write - - - -.TE -.IP \(bu 2 -Support for GIF, TGA and BMP images is minimal: the image format is -recognized, a MIME type assigned to it and the height and width of the -image are determined. -.IP \(bu 2 -Reading other TIFF-like RAW image formats, which are not listed in the -table, may also work. -.IP \(bu 2 -The thumbnail, if available, is included in the list of image previews. -.SH ACTIONS -The \fIaction\fP argument is only required if it is not clear from the -\fIoptions\fP which action is implied. -.TP -.B pr | print -Print image metadata. This is the default action, i.e. the command -\fBexiv2 image.jpg\fP will print a summary of the image Exif metadata. -.TP -.B ex | extract -Extract metadata to *.exv, XMP sidecar (*.xmp), preview image, thumbnail -or ICC profile file. -Modification commands can be applied on-the-fly. -.TP -.B in | insert -Insert metadata from corresponding *.exv, XMP sidecar (*.xmp), -thumbnail or ICC profile files. Use option \fB\--suffix\fP \fIsuf\fP to -change the suffix of the input files. Since files of any supported -format can be used as input files, this command can be used to copy -the metadata between files of different formats. Modification commands -can be applied on-the-fly. -.TP -.B rm | delete -Delete image metadata from the files. -.TP -.B ad | adjust -Adjust Exif timestamps by the given time. Requires at least one of the -options \fB\--adjust\fP \fItime\fP, \fB\--years\fP \fI+-n\fP, \fB\--months\fP -\fI+-n\fP or \fB\--days\fP \fI+-n\fP. See \fBTZ\fP in \fBENVIRONMENT\fP. -.TP -.B mo | modify -Apply commands to modify (add, set, delete) the Exif, IPTC and XMP -metadata of image files. Requires option \fB\--comment\fP \fItxt\fP, -\fB\--modify\fP \fIcmdfile\fP or \fB\--Modify\fP \fIcmd\fP. -.TP -.B mv | rename -Rename files and/or set file timestamps according to the Exif create -timestamp. Uses the value of tag Exif.Photo.DateTimeOriginal or, if -not present, Exif.Image.DateTime to determine the timestamp. The -filename format can be set with \fB\--rename\fP \fIfmt\fP, timestamp options -are \fB\--timestamp\fP and \fB\--Timestamp\fP. See \fBTZ\fP in \fBENVIRONMENT\fP. -.TP -.B fi | fixiso -Copy the ISO setting from one of the proprietary Nikon or Canon -makernote ISO tags to the regular Exif ISO tag, -Exif.Photo.ISOSpeedRatings. Does not overwrite an existing standard -Exif ISO tag. -.TP -.B fc | fixcom -Fix the character encoding of Exif Unicode user comments. Decodes the -comment using the auto-detected or specified character encoding and -writes it back in UCS-2. Use option \fB\--encode\fP \fIenc\fP to specify the current -encoding of the comment if necessary. -.br -.ne 40 -.SH COMMAND SUMMARY -.sp 1 -.nf -\fBexiv2\fP [ \fIoption\fP [\fIarg\fP] ]+ [ \fIaction\fP ] \fIfile\fP ... -.sp 1 -Where \fIfile\fP contains image metadata, optionally specified using a URL (http, https, ftp, sftp, data and file supported) or a wildcard pattern (e.g., *.jpg) -.sp 1 -\fBoption\fP [\fIarg\fP] \fBlong option\fP [\fIarg\fP] Description -\fB-a\fP \fItime\fP \fB--adjust\fP \fItime\fP Automatically modify metadata time stamps. For the 'adjust' action ... -\fB-b\fP \fB--binary\fP Obsolete and should not be used. Reserved for use with the test suite -\fB-c\fP \fItxt\fP \fB--comment\fP \fItxt\fP JPEG comment string to set in the image. For the 'modify' action ... -\fB-d\fP \fItgt1\fP \fB--delete\fP \fItgt1\fP Delete target(s) for the 'delete' action ... -\fB-D\fP \fI+-n\fP \fB--days\fP \fI+-n\fP Automated adjustment of the days in metadata dates ... -\fB-e\fP \fItgt3\fP \fB--extract\fP \fItgt3\fP Extract target(s) for the 'extract' action ... -\fB-f\fP \fB--force\fP Do not prompt before overwriting existing files. For the 'rename' and 'extract' actions ... -\fB-F\fP \fB--Force\fP Do not prompt before renaming files. For the 'rename' and 'extract' actions ... -\fB-g\fP \fIstr\fP \fB--grep\fP \fIstr\fP Only output where \fIstr\fP matches in output text ... -\fB-h\fP \fB--help\fP Display help and exit -\fB-i\fP \fItgt2\fP \fB--insert\fP \fItgt2\fP Insert target(s) for the 'insert' action ... -\fB-k\fP \fB--keep\fP Preserve file timestamps when updating files ... -\fB-K\fP \fIkey\fP \fB--key\fP \fIkey\fP Report a key. Similar to \fB--grep\fP, however \fIkey\fP must match exactly ... -\fB-l\fP \fIdir\fP \fB--location\fP \fIdir\fP Location (directory) for files to be inserted or extracted ... -\fB-m\fP \fIcmdfile\fP \fB--modify\fP \fIcmdfile\fP Read commands from a file. For the 'modify' action ... -\fB-M\fP \fIcmd\fP \fB--Modify\fP \fIcmd\fP Modify the metadata with the command. For the 'modify' action ... -\fB-n\fP \fIenc\fP \fB--encode\fP \fIenc\fP Charset to decode Exif Unicode user comments ... -\fB-O\fP \fI+-n\fP \fB--months\fP \fI+-n\fP Automated adjustment of the months in metadata dates ... -\fB-p\fP \fImod\fP \fB--print\fP \fImod\fP Print report (common reports) ... -\fB-P\fP \fIflg\fP \fB--Print\fP \fIflg\fP Print report (fine grained control) ... -\fB-q\fP \fB--quiet\fP Silence warnings and error messages ... -\fB-Q\fP \fIlvl\fP \fB--log\fP \fIlvl\fP Set the log-level to 'd'(ebug), 'i'(nfo), 'w'(arning), 'e'(rror) or 'm'(ute) ... -\fB-r\fP \fIfmt\fP \fB--rename\fP \fIfmt\fP Filename format for the 'rename' action ... -\fB-S\fP \fIsuf\fP \fB--suffix\fP \fIsuf\fP Use suffix for source files when using the 'insert' command ... -\fB-t\fP \fB--timestamp\fP Set the file timestamp from Exif metadata. For the 'rename' action ... -\fB-T\fP \fB--Timestamp\fP Only set the file timestamp from Exif metadata. For the 'rename' action ... -\fB-u\fP \fB--unknown\fP Show unknown tags ... -\fB-v\fP \fB--verbose\fP Verbose -\fB-V\fP \fB--version\fP Show the program version and exit ... -\fB-Y\fP \fI+-n\fP \fB--years\fP \fI+-n\fP Automated adjustment of the years in metadata dates ... -.sp 1 -\fIaction\fP pr | ex | in | rm | ad | mo | mv | fi | fc - print, extract, insert, delete, adjust, modify, rename, fixiso, fixcom - -\fIcmd\fP (\fBset\fP | \fBadd\fP) \fIkey\fP [[\fItype\fP] \fIvalue\fP] | \fBdel\fP \fIkey\fP [\fItype\fP] | \fBreg\fP \fIprefix\fP \fInamespace\fP - (see \fBCommand format\fP) - -\fIenc\fP Values defined in \fBiconv_open\fP(3) (e.g., UTF-8) - -\fIflg\fP E | I | X | x | g | k | l | n | y | c | s | v | t | h - Exif, IPTC, XMP, num, grp, key, label, name, type, count, size, vanilla, translated, hex - -\fIfmt\fP Default format: %Y%m%d_%H%M%S - -\fIkey\fP See \fBExiv2 key syntax\fP - -\fIlvl\fP d | i | w | e - debug, info, warning, error - -\fImod\fP s | a | e | t | v | h | i | x | c | p | C | R | S | X - summary, all, Exif, translated, vanilla, hex, IPTC, XMP, comment, preview, - ICC Profile, Recursive Structure, Simple Structure, raw XMP - -\fIsuf\fP '.' then the file's extension (e.g., '.txt') - -\fItime\fP [+|-]HH[:MM[:SS[.mmm]]] - (Default is \fB+\fP when \fB+\fP/\fB-\fP are missing) - -\fItgt1\fP a | c | e | i | I | t | x | C | - - all, comment, Exif, IPTC, IPTC all, thumbnail, XMP, ICC Profile, stdin/out - -\fItgt\fP2 a | c | e | i | t | x | C | X | XX | - - all, comment, Exif, IPTC, thumbnail, XMP, ICC Profile, SideCar, Raw XMP, stdin/out - -\fItgt3\fP a | e | i | p | t | x | C | X | XX | - - all, Exif, IPTC, preview, thumbnail, XMP, ICC Profile, SideCar, Raw XMP, stdin/out - -\fItype\fP An Exif, IPTC or XMP tag type (e.g., xmpText). See \fBExif/IPTC/XMP types\fP - -\fI+-n\fP The amount to change in the date (e.g., -3). Default is \fB+\fP when \fB+\fP/\fB-\fP are missing - -.fi -.ne 40 -.SH OPTIONS -.TP -.B \-h, --help -Display help and exit. -.TP -.B \-V, --version -Show the program version and exit. - -When \fB\--version\fP is combined with \fB\--verbose\fP, build information -is printed to standard output along with a list of shared libraries which -have been loaded into memory. Verbose version is supported on Windows -(MSVC, Cygwin and MinGW builds), macOS and Linux and is provided for test -and debugging. The library name and version number are always printed, even -if output is filtered with \fB--grep\fP. -.TP -.B \-v, --verbose -Be verbose during the program run. -.TP -.B \-q, --quiet -Silence warnings and error messages during the program run. Note that -options \fB\--quiet\fP and \fB\--verbose\fP can be used at the same time. -.TP -.B \-Q \fIlvl\fP, --log \fIlvl\fP -Set the log-level to 'd'(ebug), 'i'(nfo), 'w'(arning), 'e'(rror) -or 'm'(ute), with the \fIlvl\fP chosen including those below it -('d' <- 'i' <- 'w' <- 'e'). The default log-level is 'w'. \fB\--log\fP \fIm\fP -is equivalent to \fB\--quiet\fP. All log messages are written to standard error. -.TP -.B \-u, --unknown -Show unknown tags. Default is to suppress tags which don't have a name (e.g., Exif.SonyMisc3c.0x022b). -.TP -.B \-g \fIstr\fP, --grep \fIstr\fP -When printing tags, display only those where \fIstr\fP is found in -the key (see \fBExiv2 key syntax\fP). When \fB--grep\fP \fIstr\fP is used -with \fB--verbose --version\fP, lines are included where \fIstr\fP matches in the -variable or value. - -Multiple \fB\--grep\fP options can be used to output additional data: - -.nf -\& $ exiv2 --verbose --version --grep webready --grep time -\& exiv2 1.0.0.9 -\& time=11:01:53 -\& enable_webready=1 -\& xmlns=mediapro:http://ns.iview-multimedia.com/mediapro/1.0/ -.fi - -When the \fB--print\fP \fImod\fP and \fB--Print\fP \fIflgs\fP options are not specified, the default is \fB--print\fP \fIa\fP: - -.nf -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 --grep Date Stonehenge.jpg -\& Exif.Image.DateTime Ascii 20 2015:07:16 20:25:28 -\& Exif.Photo.DateTimeOriginal Ascii 20 2015:07:16 15:38:54 -\& Exif.Photo.DateTimeDigitized Ascii 20 2015:07:16 15:38:54 -\& Exif.NikonWt.DateDisplayFormat Byte 1 Y/M/D -\& Exif.GPSInfo.GPSDateStamp Ascii 11 2015:07:16 -\& Xmp.xmp.ModifyDate XmpText 25 2015-07-16T20:25:28+01:00 -.fi -.sp 1 -You may use \fB--print\fP \fImod\fP or \fB--Print\fP \fIflgs\fP to further filter output (\fB--print\fP \fIs\fP is ignored): - -.nf -\& $ exiv2 --print x --grep Date Stonehenge.jpg -\& Xmp.xmp.ModifyDate XmpText 25 2015-07-16T20:25:28+01:00 -.fi -.sp 1 -.br -\fIstr\fP can contain an optional \fI/i\fP modifier at the end, to indicate case insensitivity: - -.nf -\& $ exiv2 --print px --grep date/i Stonehenge.jpg -\& Xmp.xmp.ModifyDate XmpText 25 2015-07-16T20:25:28+01:00 -.TP -.B \-K \fIkey\fP, --key \fIkey\fP -Only reports tags for a given \fIkey\fP, which must match exactly -(see \fBExiv2 key syntax\fP). - -.sp 1 -Multiple \fB\--key\fP options can be used to report more than a single key: - -.nf -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 \--key Exif.Photo.DateTimeDigitized --key Exif.Photo.DateTimeOriginal Stonehenge.jpg -\& Exif.Photo.DateTimeOriginal Ascii 20 2015:07:16 15:38:54 -\& Exif.Photo.DateTimeDigitized Ascii 20 2015:07:16 15:38:54 -.fi -.TP -.B \-n \fIenc\fP, --encode \fIenc\fP -Charset to use when decoding Exif Unicode user comments, where \fIenc\fP is -a name understood by \fBiconv_open\fP(3) (e.g., 'UTF-8'). -.TP -.B \-k, --keep -Preserve file timestamps when updating files. Can be used with -all options which update files and is ignored by read-only -options. -.TP -.B \-t, --timestamp -Set the file timestamp according to the Exif create timestamp in -addition to renaming the file (overrides \fB\--keep\fP). This option is -only used with the 'rename' action. See \fBTZ\fP in \fBENVIRONMENT\fP. -.TP -.B \-T, --Timestamp -Only set the file timestamp according to the Exif create timestamp, do -not rename the file (overrides \fB\--keep\fP). This option is only used -with the 'rename' action. See \fBTZ\fP in \fBENVIRONMENT\fP. -.TP -.B \-f, --force or \-F, --Force -These options are used by the 'rename' and 'extract' actions to -determine the file overwrite policy. The options override the default -behavior, which is to prompt the user if the filename already exists. -These options are usually combined with \fB--verbose\fP, to provide -additional status output. -.sp 1 -The 'rename' action will overwrite files when \fB--force\fP is used. -Instead, if \fB--Force\fP is used and the file already exists, the new filename -is appended with '_1' ('_2', ...) to prevent data loss. -.sp 1 -The 'extract' action will overwrite files when either \fB--force\fP or -\fB--Force\fP is used. -.sp 1 -For example, renaming a file using \fB--Force\fP, where the same filename -has already been renamed: - -.nf -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 --verbose --Force rename Stonehenge.jpg -\& File 1/1: Stonehenge.jpg -\& Renaming file to ./20150716_153854.jpg - -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 --verbose --Force rename Stonehenge.jpg -\& File 1/1: Stonehenge.jpg -\& Renaming file to ./20150716_153854_1.jpg -.fi -.br -.TP -.B \-r \fIfmt\fP, --rename \fIfmt\fP -Filename format for the 'rename' action (See \fBTZ\fP in \fBENVIRONMENT\fP). -The \fIfmt\fP string follows the definitions in \fBstrftime\fP(3), using -Exif.Photo.DateTimeOriginal or Exif.Image.DateTime as the reference date -and time. In addition, the following special character sequences are also -provided: -.TS -l l l. -:basename: Original filename without extension -:dirname: Name of the directory holding the original file -:parentname: Name of parent directory -.TE -.sp 1 -The default \fIfmt\fP is %Y%m%d_%H%M%S -.sp 1 -For example, renaming a file when \fIfmt\fP is made up of the basename, day, short month and long year: - -.nf -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 --verbose --rename ':basename:_%d_%b_%Y' Stonehenge.jpg -\& File 1/1: Stonehenge.jpg -\& Renaming file to ./Stonehenge_16_Jul_2015.jpg -.fi -.sp 1 -If the filename to rename to already exists and \fB--Force\fP and \fB--force\fP -are not used, the user is prompted for an action. -.TS -l l. -[O]verwrite Rename the file, overriding the existing one -[r]ename Rename the file, but append '_1' ('_2', ...) to the new filename -[s]kip Cancel renaming this file -.TE -.sp 1 -For example, when renaming a second Stonehenge.jpg file: - -.nf -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 --verbose --rename ':basename:_%d_%b_%Y' Stonehenge.jpg -\& File 1/1: Stonehenge.jpg -\& exiv2.exe: File `./Stonehenge_16_Jul_2015.jpg' exists. [O]verwrite, [r]ename or [s]kip? r -\& Renaming file to ./Stonehenge_16_Jul_2015_1.jpg -.fi -.sp 1 -.TP -.B \-a \fItime\fP, \--adjust \fItime\fP -Time adjustment, where \fItime\fP is in the format [\-]HH[:MM[:SS]]. This option is only -used with the 'adjust' action. See \fBTZ\fP in \fBENVIRONMENT\fP. -.sp 1 -Examples of \fItime\fP are: - -.TS -l l. -+1 Adds one hour -1:01 Adds one hour and one minute --0:00:30 Subtracts 30 seconds. -.TE -.sp 1 -.TP -.B \-Y \fI+-n\fP, --years \fI+-n\fP -Time adjustment by a positive or negative number of years, for -the 'adjust' action. See \fBTZ\fP in \fBENVIRONMENT\fP. -.TP -.B \-O \fI+-n\fP, --months \fI+-n\fP -Time adjustment by a positive or negative number of months, for -the 'adjust' action. See \fBTZ\fP in \fBENVIRONMENT\fP. -.TP -.B \-D \fI+-n\fP, \--days \fI+-n\fP -Time adjustment by a positive or negative number of days, for -the 'adjust' action. See \fBTZ\fP in \fBENVIRONMENT\fP. -.TP -.B \-p \fImode\fP, --print \fImode\fP, -Print mode for the 'print' action (see \fBDESCRIPTION\fP, for metadata support in a file type). Possible modes are: -.TS -l l. -s A summary of the Exif metadata (the default for the 'print' action) -a Exif, IPTC and XMP metadata (shortcut for \fB\--Print\fP \fIkyct\fP) -e Exif metadata (shortcut for \fB\--Print\fP \fIEkycv\fP) -t Interpreted (translated) Exif tag values (shortcut for \fB\--Print\fP \fIEkyct\fP) -v Plain (untranslated) Exif tag values (shortcut for \fB\--Print\fP \fIExgnycv\fP) -h Hexdump of the Exif data (shortcut for \fB\--Print\fP \fIExgnycsh\fP) -i IPTC datasets (shortcut for \fB\--Print\fP \fIIkyct\fP) -x XMP properties (shortcut for \fB\--Print\fP \fIXkyct\fP) -c JPEG comment -p List available image previews, sorted by size in pixels (for example, see \fB--extract\fP \fItgt3\fP) -C Image ICC Profile -R Print image structure recursively (only for the 'debug' build with jpg, png, tiff, webp, cr2 and jp2 types) -S Image structure information (jpg, png, tiff, webp, cr2 and jp2 types only) -X "raw" XMP -.TE -.sp 1 -\fB--print\fP \fImode\fP can be combined with \fB--grep\fP \fIstr\fP or \fB--key\fP \fIkey\fP to further filter the output. -.sp 1 -For the order of the columns in the output, see \fB--Print\fP \fIflgs\fP. - -.TP -.B \-P \fIflgs\fP, \-Print \fIflgs\fP -Print flags allows fine control of the tag list for the 'print' action -(see \fBDESCRIPTION\fP, for metadata support in a file type). The option -allows control of the type of metadata as well as data columns included in -the print output. Valid flags are: -.TS -l l. -E Exif tags -I IPTC datasets -X XMP properties -x Tag number for Exif or IPTC tags (in hexadecimal) -g Group name (e.g., for Exif.Photo.UserComment, outputs Photo) -k Key (e.g., Exif.Photo.UserComment) -l Tag label (human readable tagname, e.g., for Exif.Photo.UserComment, outputs 'User comment') -n Tagname (e.g., for Exif.Photo.UserComment, outputs UserComment) -y Type (for available types, see \fBExif/IPTC/XMP types\fP) -c Number of components (for single entry types, the number of \fBsizeof('type')\fP in 'size'. For multi-entry types, the number of entries. See \fBExif/IPTC/XMP types\fP) -s Size in bytes -v Plain data value (vanilla values, i.e., untranslated) -V Plain data value AND the word 'set ' (for use with \fB--modify\fP \fI-\fP option) -t Interpreted (translated) human readable data values -h Hexdump of the data -.TE - -The order of the values in \fIflgs\fP is not respected, with output -displayed as follows: - -.sp 1 -Tag number (x) | Plain 'set' (V) | Group (g) | Key (k)| Tagname (n)| Tagname label (l) | Type (y) | Components (c) | Size (s) | Value (E, I, X, v, t) -.sp 1 -For example, displaying the IPTC tags in a file: - -.nf -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 --Print xgknlycsIt Stonehenge.jpg -\& 0x0000 Envelope Iptc.Envelope.ModelVersion ModelVersion Model Version Short 1 2 4 -\& 0x005a Envelope Iptc.Envelope.CharacterSet CharacterSet Character Set String 3 3 -\& 0x0000 Application2 Iptc.Application2.RecordVersion RecordVersion Record Version Short 1 2 4 -\& 0x0078 Application2 Iptc.Application2.Caption Caption Caption String 12 12 Classic View -.fi -.sp 1 -\fB--Print\fP \fIflgs\fP can be combined with \fB--grep\fP \fIstr\fP or \fB--key\fP \fIkey\fP to further filter the output. -.TP -.B \-d \fItgt1\fP, \--delete \fItgt1\fP -Delete target(s) for the 'delete' action. Possible targets are: -.TS -l l. -a All supported metadata (the default for the 'delete' action) -e Exif section -t Exif thumbnail only -i IPTC data -x XMP packet -c JPEG comment -C ICC Profile -I All IPTC data (removes broken metadata containing multiple IPTC blocks) -.TE -.TP -.B \-i \fItgt2\fP, --insert \fItgt2\fP -Insert target(s) for the 'insert' action (see \fBDESCRIPTION\fP, for metadata support in a file type). Possible targets are: -.sp 1 -.TS -l l. -a All supported metadata (the default for the 'insert' action) -e Exif section -t Exif thumbnail. Only JPEG thumbnails can be inserted from a file called \fIfile-thumb.jpg\fP -i IPTC data -x XMP packet -c JPEG comment -C ICC Profile, inserted from a file called \fI.icc\fP -X Insert metadata from an XMP sidecar file, .xmp. The remaining targets determine which metadata to include, possible are Exif, IPTC and XMP (default is all of these). Inserted XMP properties include those converted to Exif and IPTC -XX Insert "raw" XMP metadata from a sidecar file, .exv -- Insert from stdin. This option is intended for "filter" operations -.TE -.sp 1 -Filter operations between extract and insert are possible, using the following template; \fBxmllint\fP can be optionally used when extracting XMP sidecar files: -.sp 1 -.nf -\& $ exiv2 -e{tgt3}- filename | [ xmllint .... |] exiv2 -i{tgt2}- filename -.fi -.sp 1 -.TP -.B \-e \fItgt3\fP, --extract \fItgt3\fP -Extract target(s) for the 'extract' action. Possible targets are: -.br -.TS -l l. -a All supported metadata (the default for the 'extract' action) -e Exif section -t Extract Exif thumbnail only to a file called \fI-thumb.jpg\fP -i IPTC data -x XMP packet -c JPEG comment -p[[, ...]] Extract preview images to files called \fI-preview.jpg\fP (\fB--extract\fP \fIp\fP extracts all previews). The thumbnail is included in any preview images -C Extract ICC profile, to a file called \fI.icc\fP -X Extract metadata to an XMP sidecar file, .xmp, the remaining targets determine what metadata to extract (default is Exif, IPTC and XMP). Supported Exif and IPTC data is stored as XMP tags -XX Extract "raw" XMP metadata to a sidecar . Other targets cannot be used with this, as only XMP data is written -- Output to stdout (see \fB\--insert\fP \fItgt2\fP for an example of this feature) -.TE -.sp 1 - -When extracting preview images, first list which previews are available: - -.nf -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 --print p Stonehenge.jpg -\& Preview 1: image/jpeg, 160x120 pixels, 10837 bytes -.fi - -then extract the preview by number (in this case, preview 1 is also the thumbnail): - -.nf -\& $ exiv2 --verbose --extract p1 Stonehenge.jpg -\& File 1/1: Stonehenge.jpg -\& Writing preview 1 (image/jpeg, 160x120 pixels, 10837 bytes) to file ./Stonehenge-preview1.jpg -.fi -.sp 1 -.TP -.B \-c \fItxt\fP, --comment \fItxt\fP -JPEG comment string to set in the image ('modify' action). This option -can also be used with the 'extract' and 'insert' actions to modify -metadata on-the-fly. -.TP -.B \-m \fIcmdfile\fP, --modify \fIcmdfile\fP -Command file for the 'modify' action (see \fBCommand file format\fP and -\fB'MODIFY' COMMANDS\fP). This option can also be used with the 'extract' -and 'insert' actions to modify metadata on-the-fly. \fB--modify\fP \fI-\fP reads -modify commands from standard-input. -.TP -.B \-M \fIcmd\fP, --Modify \fIcmd\fP -Command line for the 'modify' action (see \fB'MODIFY' COMMANDS\fP). This option -can also be used with the 'extract' and 'insert' actions to modify -metadata on-the-fly. The format for the commands is the same as that -of the lines of a command file. -.TP -.B \-l \fIdir\fP, --location \fIdir\fP -Location (directory) for files to be inserted from or extracted to. -.TP -.B \-S \fIsuf\fP, --suffix \fIsuf\fP -Use suffix \fIsuf\fP for source files when using 'insert' action (e.g., '.txt'). -.br -.ne 40 -.SS 'MODIFY' COMMANDS -Tags can be altered using the 'modify' action and \fB--Modify\fP \fIcmd\fP -or \fB--modify\fP \fIcmdfile\fP. - -For example, adding an IPTC tag on the command line: - -.nf -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 --Modify "add Iptc.Application2.Credit String Mr. Mills" Stonehenge.jpg -.fi - -or applying a set of 'modify' commands from a file (see ['Modify' command File](#modify_cmd_file)): - -.nf -\& $ exiv2 --modify cmd.txt Stonehenge.jpg -.fi - -Multiple \fB--Modify\fP \fIcmd\fP and \fB--modify\fP \fIcmdfile\fP -options can be combined together, with the changes applied left to right on -each file. For example, applying one command line 'modify' then a 'modify' -command file, then another command line 'modify': - -.nf -\& $ exiv2 --Modify "set Iptc.Application2.Caption Stonehenge" --modify cmdfile.txt --Modify "add Iptc.Application2.Keywords Monument" Stonehenge.jpg -.fi - -A list of modify commands can be generated from an existing file using -\fB--Print\fP \fIVkyv\fP. For example, only displaying the 'dc' 'modify' -commands: - -.nf -\& $ exiv2 --Print Vkyv --grep dc Stonehenge.jpg -\& set Xmp.dc.description LangAlt lang="x-default" Classic View -\& set Xmp.dc.Family XmpBag Robin -.fi - - -Using \fB--modify\fP \fIcmdfile\fP, a command file can be read from stdin instead of -being a named file. For example: - -.nf -\& $ cat cmdfile.txt | exiv2 --modify - Stonehenge.jpg -.fi - -When modifying, only a correct metadata structure is enforced and it is -possible to write tags with types and values different from those specified -in the standards. This can include incorrect types (e.g., change -Exif.Image.DateTime to a Float), \fBDuplicate Exif tags\fP or incomplete metadata -(e.g., deleting Exif.GPSInfo.GPSLatitudeRef, which works together with -Exif.GPSInfo.GPSLatitude). While \fBexiv2\fP is able to read all metadata -that it can write, other programs may have difficulties with images that -contain non standards-defined metadata. - -.TP -\fBQuotations with 'modify' commands\fP -With \fB--Modify\fP \fIcmd\fP, quotation marks are use to surround the -\fIcmd\fP. The Windows command line requires double quotes to be -used, however generally, quotes inside that string, can be either single -or double. Generally, UNIX based systems can use pairs of single or double -quotes in any position. In both systems, inner string quotation marks may -need to use the '\' escape sequence. - -See note on quotations when using \fBXMP LangAlt values\fP. - - -.TP -\fB'Modify' command format\fP -The format of a command is: - -( \fBset\fP | \fBadd\fP ) \fIkey\fP [ [ \fItype\fP ] \fIvalue\fP ] | \fBdel\fP \fIkey\fP [ \fItype\fP ] | \fBreg\fP \fIprefix\fP \fInamespace\fP - -Where: - -.TS -l l. -\fBadd\fP Adds a tag. For Exif and IPTC repeatable tags, this adds a new tag, otherwise this replaces any existing tag (see \fBMultiple elements\fP and \fBDuplicate Exif tags\fP) -\fBset\fP Set the *value* of an existing tag with a matching \fIkey\fP or if undefined, \fBadd\fP the tag. If \fBDuplicate Exif tags\fP or IPTC repeatable tags already exist, this replaces them (see \fBMultiple elements\fP) -\fBdel\fP Delete all occurrences of a tag that matches *key*, including any duplicate tags -\fBreg\fP Registers an XMP \fInamespace\fP with an XMP \fIprefix\fP (see \fBXMP namespaces\fP) If registering an existing \fIprefix\fP with a different \fInamespace\fP, then the namespace is updated -.TE - -using the parameters: - -.TS -l l. -\fIkey\fP An Exif, IPTC or XMP key (see \fBExiv2 key syntax\fP) -\fItype\fP The type for the tag, a default is used if none is given. For built-in tags, the default is defined in the standard and for registered XMP tags, the default is XmpText (see \fBExif/IPTC/XMP types\fP) -\fIvalue\fP The remaining text on the line is the value, and can optionally be enclosed in quotes (see \fBQuotations with 'modify' commands\fP). For Ascii, XmpAlt, XmpBag, XmpSeq and XmpText, the value is optional which is equivalent to an empty value ("") -\fIprefix\fP This is the XMP 'Group' that is being registered. This is case sensitive and must be unique within an image's metadata. e.g., For an "Exiv2" *prefix*, the tags for that group are available as Xmp.Exiv2.Tagname -\fInamespace\fP An identifier for the prefix. This is case sensitive and must be unique within an image's metadata. Built-in namespaces use a URL format, but they are not required to exist -.TE - -.TP -\fBSetting a Rational or SRational value\fP -For the 'Rational' and 'SRational' formats, see \fBExif/IPTC/XMP types\fP. - -For example, modifying a 'Rational' number: - -.nf -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 --Modify"set Exif.Photo.MaxApertureValue 2485427/500000" Stonehenge.jpg -.fi - - -.TP -\fBSetting an aperture value\fP -Exif aperture values are stored in an apex-value format and when using the -translated print option, are output as an Fnumber value. The APEX Fnumber -translations use the formulae (in base 2): - -.nf -apex-value = log(Fnumber) * 2.0 / log(2.0) -Fnumber = exp(apex-value * log(2.0) / 2.0) -.nf - -The apex-value is a Rational and can be modified as shown in \fBSetting a Rational or SRational value\fP, -however a convenience method is also provided to set an Fnumber directly. -This uses the format: - -.nf -\fBF\fP\fI\fP -.fi - -Where \fI\fP is either an integer or decimal number. - -For example, the following modify will produce the same value as the -example in \fBSetting a Rational or SRational value\fP. This is displayed -in vanilla and translated output: - -.nf -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 --Modify "set Exif.Photo.MaxApertureValue F5.6" Stonehenge.jpg -\& $ exiv2 --print e --grep MaxApertureValue Stonehenge.jpg -\& Exif.Photo.MaxApertureValue Rational 1 2485427/500000 -\& $ exiv2 --print t --grep MaxApertureValue Stonehenge.jpg -\& Exif.Photo.MaxApertureValue Rational 1 F5.6 -.fi - -More information about APEX values is available from: \fIhttp://en.wikipedia.org/wiki/APEX_system\fP - -.TP -\fBSetting a Comment value\fP -For the 'Comment' format, see \fBExif 'Comment' values\fP. - -For example, to set an Ascii comment: - -.nf -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 --Modify "set Exif.Photo.UserComment charset=Ascii Photo" Stonehenge.jpg -\& $ exiv2 --grep UserComment Stonehenge.jpg -\& Exif.Photo.UserComment Undefined 13 charset=Ascii Photo -.fi - -or a Unicode comment: - -.nf -\& $ exiv2 --Modify "set Exif.GPSInfo.GPSProcessingMethod charset=Unicode \\u0047\\u0050\\u0053" Stonehenge.jpg -\& $ exiv2 --grep GPSProcessingMethod Stonehenge.jpg -\& Exif.GPSInfo.GPSProcessingMethod Undefined 14 charset=Unicode GPS -.fi - -.TP -\fBRegistering an XMP namespace\fP -For help with namespaces, see \fBXMP namespaces\fP. - -Each XMP \fInamespace\fP has a \fIprefix\fP -associated with it. For example, when modifying, this is declared using -the string: - -.nf -\& --Modify "reg myprefix http://ns.myprefix.me/" -.fi - -When a non-standard group or tag belonging to that group is modified, the -appropriate 'reg' 'modify' command must be included before that. For example, -adding a 'myPhotos' group with a 'weather' tag and values: - -.nf -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 --Modify "reg myPhotos http://ns.myPhotos.org/" --Modify "add Xmp.myPhotos.weather XmpBag Cloudy" Stonehenge.jpg -\& $ exiv2 --Modify "reg myPhotos http://ns.myPhotos.org/" --Modify "set Xmp.myPhotos.weather XmpBag Sunny" Stonehenge.jpg -\& $ exiv2 --Modify "reg myPhotos http://ns.myPhotos.org/" --Modify "set Xmp.myPhotos.weather XmpBag Hot" Stonehenge.jpg -\& $ exiv2 --grep myPhotos Stonehenge.jpg -\& Xmp.myPhotos.weather XmpBag 3 Cloudy, Sunny, Hot -.fi - -.TP -\fBAdding new XMP tags\fP -Provided that an XMP's group is defined (see \fBRegistering an XMP namespace\fP), -new tags can be added by assigning values. - -For example, to add a \fIRatingInPercent\fP tag to a built-in namespace and -a \fISurname\fP tag to a registered namespace: - -.nf -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 --Modify "add Xmp.xmp.RatingInPercent XmpText 98" Stonehenge.jpg -\& $ exiv2 --Modify "reg cm2e http://clanmills.com/exiv2/" --Modify "add Xmp.cm2e.Surname XmpText Mills" Stonehenge.jpg -\& $ exiv2 --grep RatingInPercent --grep Surname Stonehenge.jpg -\& Xmp.xmp.RatingInPercent XmpText 2 98 -\& Xmp.cm2e.Surname XmpText 5 Mills -.fi - -.TP -\fBSetting an XMP LangAlt value\fP -For the LangAlt format, see \fBXMP LangAlt values\fP. When -setting a LangAlt tag, only one entry is allowed per modify. - -For example, adding one default, one language/country and one language entry: - -.nf -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 --Modify "set Xmp.dc.description LangAlt Monument" Stonehenge.jpg -\& $ exiv2 --Modify "set Xmp.dc.description LangAlt lang=de-DE das Monument" Stonehenge.jpg -\& $ exiv2 --Modify "set Xmp.dc.description LangAlt lang="fr" les monuments" Stonehenge.jpg -\& $ exiv2 --grep description Stonehenge.jpg -\& Xmp.dc.description LangAlt 3 lang="x-default" Monument, lang="de-DE" das Monument, lang="fr" les monuments -.fi - -To remove a language specification, set the value to the empty string. -For example: - -.nf -\& $ exiv2 --Modify "set Xmp.dc.description lang=de-DE" Stonehenge.jpg -.fi - -To remove all language specifications, delete the key. For example: - -.nf -\& $ exiv2 --Modify "del Xmp.dc.description" Stonehenge.jpg -.fi - -.TP -\fBSetting an XMP struct value\fP -For the format of XMP structs, see \fBExiv2 key syntax\fP and \fBXMP structs\fP. - -To create a struct, first set the base key to an empty version of an array -type. This can be achieved by either stating the array type and using the -empty string, or by using XmpText and stating the array type. - -For example, both of the following set the Xmp.xmpMM.History tag to an -empty XmpSeq: - -.nf -\& --Modify "add Xmp.xmpMM.History XmpSeq \"\"" -\& --Modify "add Xmp.xmpMM.History XmpText type=Seq" -.fi - -Numbered keys plus name and action can then be added. - -For example, setting the Xmp.xmpMM.History tag to record the file being -converted from tiff to JPEG, then saved: - -.nf -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 --Modify "add Xmp.xmpMM.History XmpSeq \"\"" Stonehenge.jpg -\& $ exiv2 --Modify "add Xmp.xmpMM.History[1]/stEvt:action derived" Stonehenge.jpg -\& $ exiv2 --Modify "add Xmp.xmpMM.History[1]/stEvt:parameters converted from image/tiff to image/jpeg, saved to new location" Stonehenge.jpg -\& $ exiv2 --Modify "add Xmp.xmpMM.History[2]/stEvt:action saved" Stonehenge.jpg -\& $ exiv2 --Modify "add Xmp.xmpMM.History[2]/stEvt:instanceID xmp.iid:89A4EB97412C88632107D65978304F45" Stonehenge.jpg -\& $ exiv2 --Modify "add Xmp.xmpMM.History[2]/stEvt:when 2021-08-13T10:12:09+01:00" Stonehenge.jpg -\& $ exiv2 --Modify "add Xmp.xmpMM.History[2]/stEvt:softwareAgent MySuperPhotoFixer 1.0" Stonehenge.jpg -\& $ exiv2 --grep xmpMM Stonehenge.jpg -\& Xmp.xmpMM.History XmpText 0 type="Seq" -\& Xmp.xmpMM.History[1] XmpText 0 type="Struct" -\& Xmp.xmpMM.History[1]/stEvt:action XmpText 7 derived -\& Xmp.xmpMM.History[1]/stEvt:parameters XmpText 62 converted from image/tiff to image/jpeg, saved to new location -\& Xmp.xmpMM.History[2] XmpText 0 type="Struct" -\& Xmp.xmpMM.History[2]/stEvt:action XmpText 5 saved -\& Xmp.xmpMM.History[2]/stEvt:instanceID XmpText 40 xmp.iid:89A4EB97412C88632107D65978304F45 -\& Xmp.xmpMM.History[2]/stEvt:when XmpText 25 2021-08-13T10:12:09+01:00 -\& Xmp.xmpMM.History[2]/stEvt:softwareAgent XmpText 21 MySuperPhotoFixer 1.0 -.fi - -Nested arrays are permitted. For example, to add an additional XmpSeq to -the first struct in the Xmp.xmpMM.History tag: - -.nf -\& $ exiv2 --Modify "add Xmp.xmpMM.History[1]/stEvt:myBag XmpText type=Bag" Stonehenge.jpg -\& $ exiv2 --Modify "add Xmp.xmpMM.History[1]/stEvt:mySeq[1]/stEvt:action open a file" Stonehenge.jpg -\& $ exiv2 --Modify "add Xmp.xmpMM.History[1]/stEvt:mySeq[2]/stEvt:action convert" Stonehenge.jpg -\& $ exiv2 --Modify "add Xmp.xmpMM.History[1]/stEvt:mySeq[3]/stEvt:action save" Stonehenge.jpg -\& $ exiv2 --grep xmpMM Stonehenge.jpg -\& $ exiv2 --grep xmpMM Stonehenge.jpg -\& Xmp.xmpMM.History XmpText 0 type="Seq" -\& Xmp.xmpMM.History[1] XmpText 0 type="Struct" -\& Xmp.xmpMM.History[1]/stEvt:action XmpText 7 derived -\& Xmp.xmpMM.History[1]/stEvt:parameters XmpText 62 converted from image/tiff to image/jpeg, saved to new location -\& Xmp.xmpMM.History[1]/stEvt:mySeq XmpText 0 type="Seq" -\& Xmp.xmpMM.History[1]/stEvt:mySeq[1] XmpText 0 type="Struct" -\& Xmp.xmpMM.History[1]/stEvt:mySeq[1]/stEvt:action XmpText 11 open a file -\& Xmp.xmpMM.History[1]/stEvt:mySeq[2] XmpText 0 type="Struct" -\& Xmp.xmpMM.History[1]/stEvt:mySeq[2]/stEvt:action XmpText 7 convert -\& Xmp.xmpMM.History[1]/stEvt:mySeq[3] XmpText 0 type="Struct" -\& Xmp.xmpMM.History[1]/stEvt:mySeq[3]/stEvt:action XmpText 4 save -\& Xmp.xmpMM.History[2] XmpText 0 type="Struct" -\& Xmp.xmpMM.History[2]/stEvt:action XmpText 5 saved -\& Xmp.xmpMM.History[2]/stEvt:instanceID XmpText 40 xmp.iid:89A4EB97412C88632107D65978304F45 -\& Xmp.xmpMM.History[2]/stEvt:when XmpText 25 2021-08-13T10:12:09+01:00 -\& Xmp.xmpMM.History[2]/stEvt:softwareAgent XmpText 21 MySuperPhotoFixer 1.0 -.fi - -.TP -\fB'Modify' command file\fP -Commands for the 'modify' action can be read from a file. They are executed -line-by-line, as though each command were passed to \fB--Modify\fP \fIcmd\fP -on a single \fBexiv2\fP line. In the file, any blank lines or additional white -space is ignored and any lines beginning with a '#' are comments. When -registering namespaces, place this in the file before the command to use it. - -For help creating a command file from an existing file, see \fBExtracting modify commands\fP. - -For example, a 'cmd.txt' file: - -.nf -\& # Comments are ignored -\& add Xmp.dc.description LangAlt lang="x-default" Monument -\& set Xmp.dc.description LangAlt lang="de-DE" das Monument -\& -\& # This command was generated from a file. Additional whitespace is ignored -\& set Xmp.xmp.Rating XmpText 0 -\& -\& # Additional whitespace is ignored -\& del Iptc.Application2.Caption -\& -\& # Use 'reg' before modifying any non-standard 'Group' -\& reg myPhotos https://ns.myPhotos.org/ -\& set Xmp.myPhotos.weather Cloudy -.fi - -would be run using: - -.nf -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 --modify cmd.txt Stonehenge.jpg -.fi - -For another example, see: \fIhttps://www.exiv2.org/sample.html\fP -.br -.ne 40 -.SH EXIV2 GROUPS, TYPES AND VALUES - -Exiv2 supports Exif 2.32, Adobe XMP 4.4.0 by default, although can be built with newer versions of the SDK, and many manufacturer's MakerNotes. - -.SS Exiv2 tags -See \fBExiv2 key syntax\fP for the format of a key. The following groups are defined for the Exif family: -.sp 1 - -.TS -l l l l l l. -GPSInfo Canon Nikon1 NikonMe OlympusFe8 SonyMisc2b -Image CanonCf Nikon2 NikonPc OlympusFe9 SonyMisc3c -Image2 CanonCs Nikon3 NikonPreview OlympusFi SonyMinolta -Image3 CanonFi NikonAFT NikonSi01xx OlympusIp SonySInfo1 -Iop CanonPa NikonAf NikonSi02xx OlympusRd -MakerNote CanonPi NikonAf NikonSiD300a OlympusRd2 Samsung2 -MpfInfo CanonPr NikonAf2 NikonSiD300b OlympusRi SamsungPictureWizard -Photo CanonSi NikonAf22 NikonSiD40 SamsungPreview -SubImage1 CanonTi NikonCb1 NikonSiD80 Sigma -SubImage2 NikonCb2 NikonVr -SubImage3 Casio NikonCb2a NikonWt Sony1 -SubImage4 Casio2 NikonCb2b Sony1Cs -SubImage5 NikonCb3 Olympus Sony1Cs2 -SubImage6 Minolta NikonCb4 Olympus2 Sony1MltCs7D -SubImage7 MinoltaCs5D NikonFi OlympusCs Sony1MltCsA100 -SubImage8 MinoltaCs7D NikonFl1 OlympusEq Sony1MltCsNew -SubImage9 MinoltaCsNew NikonFl2 OlympusFe1 Sony1MltCsOld -SubThumb1 MinoltaCsOld NikonFl3 OlympusFe2 Sony2 -Thumbnail NikonIi OlympusFe3 Sony2Cs - Panasonic NikonLd1 OlympusFe4 Sony2Cs2 -Pentax PanasonicRaw NikonLd2 OlympusFe5 Sony2010e -PentaxDng NikonLd3 OlympusFe6 Sony2Fp - Fujifilm NikonLd4 OlympusFe7 SonyMisc1 -.TE -.sp 1 -A full list of built-in Exif, IPTC and XMP tags is available online at -\fIhttps://www.exiv2.org/metadata.html\fP. To query Exiv2 Groups and Tagnames, -a sample program called \fItaglist\fP is provided (see -\fIhttps://github.com/Exiv2/exiv2/blob/main/README-SAMPLES.md\fP), which -can be built from source (see \fIhttps://github.com/Exiv2/exiv2/blob/main/README.md\fP) or -downloaded from \fIhttps://www.exiv2.org/download.html\fP. -.sp 1 -For the Exif, IPTC and XMP groups: -.sp 1 -.IP \(bu -The same tags that are available in Exif's Image group (e.g., \fIExif.Image.XResolution\fP), -are also available in Exif's Thumbnail, Image(2|3), SubImage(1-9) and -SubThumb1 groups, (e.g., \fIExif.Thumbnail.XResolution\fP). -.sp 1 -.IP \(bu -Many camera manufacturer tags are available and are accessed as different -Exif groups, using the manufacturer's name as a prefix (e.g., CanonCs is the -Camera Settings for a Canon camera). Groups called the manufacturer name -plus number, access the main tags in different file formats (e.g., Sony1 is for -JPEGs, Sony2 is for others such as TIFF and ARW). Groups are available for -use, depending upon which camera manufacturer and model captured the photo. -Supporting the large number of tags for all the different manufacturers -is an ongoing task, only partial support is available. The full unprocessed -makernotes data is available in Exif.Photo.MakerNote. -.sp 1 -.IP \(bu -Every Exif tag and IPTC dataset has a tag number (16 bit, 2 byte integer), -which is unique within a Group (to display, see \fB--Print\fP \fIx\fP). -.sp 1 -.IP \(bu -Some of the Exif tags and IPTC datasets are mirrored in the XMP specification -(see \fIhttps://www.exiv2.org/metadata.html\fP). -.sp 1 -.IP \(bu -The XMP specification is flexible and allows new custom Groups and -Tagnames to be added (see \fBCommand format\fP). -.sp 1 -For example, the 'cm2e' Group has been added, which has 'Father' and 'Family' -Tagnames. Additionally, a 'Family' tag has been added to the built-in 'dc' Group: -.sp 1 -.nf -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 --print x Stonehenge.jpg -\& Xmp.xmp.Rating XmpText 1 0 -\& Xmp.xmp.ModifyDate XmpText 25 2015-07-16T20:25:28+01:00 -\& Xmp.cm2e.Father XmpText 11 Robin Mills -\& Xmp.cm2e.Family XmpBag 0 -\& Xmp.dc.description LangAlt 1 lang="x-default" Classic View -\& Xmp.dc.Family XmpBag 1 Robin -.fi -.IP \(bu -Further information on Exiv2 groups can be found on the Exiv2 wiki: \fIhttps://github.com/Exiv2/exiv2/wiki\fP -.sp 1 -.ne 20 -.sp 1 -.SS Exif/IPTC/XMP types -.fi -Each tag uses a specific type to store the value, with all elements in any array having the same type. Available types for the -different 'Family' categories are: -.sp 1 -.TP -\fBExif\fI -.TS -lB lB lB lB -_ _ _ _ -l l l l. -Type Format Element Comment -Short A 16-bit (2-byte) unsigned integer Single -Long A 32-bit (4-byte) unsigned integer Single -Rational Two Long types. Numerator and denominator Single Use as X/Y (e.g., "31/1" is 31.0) -Byte A string of 8-bit unsigned integers Single -SShort A 16-bit (2-byte) signed integer Single -SLong A 32-bit (4-byte) signed integer Single -SRational Two SLong types. Numerator and denominator Single Use as [ + | - ]X/Y (e.g., "-31/1" is -31.0) -SByte A string of 8-bit signed integers Single -Float Signed single precision (4-byte) IEEE format Single Use as a signed decimal (e.g., "-0.5" is -0.5) -Double Signed double precision (8-byte) IEEE format Single Use as a signed decimal (e.g., "-0.5" is -0.5) -Ascii A string of 7-bit ASCII. NULL terminated Single Use as a string (e.g., "Value") -Comment A string of 7-bit ASCII. NULL terminated Single Use as a string (e.g., "Value"). See \fIValue\fP in \fBCommand format\fP -Undefined A string of 8-bit bytes Single Use as a string (e.g., "Value") -.TE -.sp 1 -.TP -\fBIPTC\fP -.TS -lB lB lB lB -_ _ _ _ -l l l l. -Type Format Element Comment -String A string of ASCII Single -Short A 16-bit (2-byte) unsigned integer Single -Date A string of ASCII (8 bytes) Single See \fBDate/Time formats\fP -Time A string of ASCII (11 bytes) Single See \fBDate/Time formats\fP -Undefined A string of 8-bit bytes Single Use as a string (e.g., "Value") -.TE -.sp 1 -.TP -\fBXMP\fP -.TS -lB lB lB lB -_ _ _ _ -l l l l. -Type Format Element Comment -LangAlt A string of text Multi Similar to XmpAlt. Alternative text for different languages, e.g., 'lang="x-default" Black, lang="fr-FR" Noir' (see \fBMultiple elements\fP and \fBCommand format\fP) -XmpAlt A string of text Multi An ordered array, any default value is first -XmpBag A string of text Multi An unordered array (e.g., 3 values, "Red, Yellow, Green"), see \fBMultiple elements\fP and \fBCommand format\fP -XmpSeq A string of text Multi An ordered array (e.g., 3 values, "Gold, Silver, Bronze"), see \fBMultiple elements\fP and \fBCommand format\fP -XmpText A string of text Single -.TE -.sp 1 -.SS -\fBExiv2 key syntax\fP - -The standard format for Exif and IPTC tags is: - -\fIFamily\fP.\fIGroup\fP.\fITagname\fP - -.TS -l l. -\fIFamily\fP Either 'Exif' or 'Iptc' -\fIGroup\fP The tag group within the family. e.g., for Exif, 'Image' -\fITagname\fP The tagname within a family and group. e.g., For Exif.Image, 'Model' -.TE - -For example, Exif.Image.Model or Iptc.Application2.Subject . - -In addition to the standard key syntax, XMP can also use an extended format: - -\fIFamily\fP.\fIGroup\fP.\fITagname\fP[ \fI\\fP[ \fI\\fP ] ]+ - -.TS -l l. -\fIFamily\fP i.e. 'Xmp' -\fIGroup\fP The tag group within the family. e.g., for Xmp, 'dc' -\fITagname\fP The tagname within a family and group. e.g., For Xmp.dc, 'subject' -\fI\\fP An integer (1,...,n) surrounded by square brackets (e.g., [n], is the n'th item in the 'array') -\fI\\fP This is \fI/name1\fP : \fIname2\fP (e.g., /dim:length). Within a \fIFamily.Group.Tagname[n]\fP and nested arrays, only one type of \fI/name1\fP identifier is allowed, but many \fIname2\fP values -.TE - -For example, the Xmp.xmpMM.History tag would use the extended key: - -.nf -\& Xmp.xmpMM.History[1]/stEvt:action -.fi - -Nested structures are permitted and use multiple [ \fI\\fP [ \fI\\fP ] ] -in the key. For example, if an Xmp.xmpMM.History tag defined an additional -nested array struct, the extended key would be: - -.nf -\& Xmp.xmpMM.History[1]/stEvt:myArray[1]/myName1:myName2 -.fi - -See \fBXMP structs\fP and \fBSetting an XMP struct value\fP. - -More information about XMP keys and conventions for \fI\\fP is -available from: \fIhttps://www.adobe.com/content/dam/acom/en/devnet/xmp/pdfs/XMPSDKReleasecc-2020/XMPSpecificationPart2.pdf#G4.1132618\fP - -.SS -\fBMultiple elements\fP -Some IPTC datasets and XMP properties allow multiple elements to be stored, although they both do this in different ways. -.TP -\fBIPTC\fP -.sp 1 -IPTC datasets marked as repeatable, can have multiple entries with the -same key (Family.Group.Tagname) in the image metadata (for supported datasets, -see \fIhttps://www.exiv2.org/iptc.html\fP, column R). -For example, a file containing three Iptc.Application2.Subject values: - -.nf -\& $ exiv2 --grep Application2 Stonehenge_with_extra_data.jpg -\& Iptc.Application2.RecordVersion Short 1 4 -\& Iptc.Application2.Caption String 12 Monument -\& Iptc.Application2.Subject String 10 Stonehenge -\& Iptc.Application2.Subject String 6 Cloudy -\& Iptc.Application2.Subject String 5 Grass -.fi - -.TP -\fBXMP\fP -.sp 1 -XMP multiple values are grouped together within the same tag, using ", " as -a separator (see \fBExif/IPTC/XMP types\fP for supported types). If a default -value exists for a LangAlt or XmpAlt tag, then this is the first item listed. -For example, a file containing two Xmp.dc.description values (for format, see -\fBCommand format\fP) and three Xmp.dc.subject values: - -.nf -\& $ exiv2 --grep description --grep subject Stonehenge_with_extra_data.jpg -\& Xmp.dc.description LangAlt 1 lang="x-default" Monument, lang="de-DE" das Monument -\& Xmp.dc.subject XmpBag 3 Stonehenge, Cloudy, Grass -.fi -.ne 8 -.fi -.SS -\fBDuplicate Exif tags\fP -The Exif specification allows for duplicate tags, but this is currently -unused by any current tag definitions. -.SS Date/Time formats -.fi -The times and dates are stored using different formats in image metadata. -.TP -\fBExif\fP -.sp 1 -An Exif DateTime string is stored as 20 ascii bytes (including trailing NULL) in the format: -.RS -.IP -YYYY:MM:DD HH:mm:SS -.sp 1 -.RE -.IP -where YYYY:MM:DD is the year, month and day and HH:mm:SS is the hour, minute -and second (e.g., "2010:09:15 08:45:21" is 08:45:21 on 15-Aug-10). -.IP -The options \fB--timestamp\fP and \fB--Timestamp\fP will accept files -in which the Date part, has been incorrectly stored as YYYY-MM-DD. -.TP -\fBIPTC\fP -.sp 1 -An IPTC 'Date' type is stored in the format: -.sp 1 -.RS -.IP -YYYY-MM-DD -.RE -.IP -where YYYY-MM-DD is the year, month and day (e.g., "2010-09-15" is 15-Aug-10). -.sp 1 -An IPTC 'Time' type is stored in the format: -.RS -.IP -HH:MM:SScHH:MM -.RE -.IP -where HH:MM:SS refers to local time's hour, minutes and seconds and, HH:MM -refers to hours and minutes with c being ahead (+) or behind (-) Universal -Coordinated Time (UCT) (e.g., 08:45:15+01:00 is -08:45:15, which is +1 hour different from UCT). -.TP -\fBMakernote tags\fP -.sp 1 -There is no one single format. Different camera manufacturers use different -formats, even within their own sets of tags. Some tags use encoded data -that does not conform to any official format. - -.SS -\fBExif 'Comment' values\fP -Exif 'Comment' values can include an optional charset definition to explain -how to interpret the rest of the value. This is used by tags such as -Exif.Photo.UserComment, Exif.GPSInfo.GPSProcessingMethod and -Exif.GPSInfo.GPSAreaInformation. - -The format of the value is: - -[ \fBcharset=\fP ( \fIAscii\fP | \fIJis\fP | \fIUnicode\fP | \fIUndefined\fP ) ] comment - -If the charset is not specified then the default is \fIUndefined\fP. - -For example, if Ascii and Unicode Comments have been set: - -.nf -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 --grep UserComment --grep GPSProcessingMethod Stonehenge.jpg -\& Exif.Photo.UserComment Undefined 16 charset=Ascii Monument -\& Exif.GPSInfo.GPSProcessingMethod Undefined 14 charset=Unicode GPS -.fi - -The reported size of the 'value' is calculated as: - -.nf -\& 8 Bytes (for the "charset=val ") + (the rest of the value) * (2 Bytes for Unicode, otherwise 1 Byte) -.fi - -.SS -\fBXMP namespaces\fP -Every XMP 'Group' (called a \fIprefix\fP) has an identifier (called a -\fInamespace\fP) associated with it. Within an image's metadata, both -namespaces and prefixes are unique. - -\fBexiv2\fP has standards defined prefixes and namespaces built-in, which -can be displayed in the format: - -.nf -\& `xmlns=: -.fi - -For example, here, only a couple are shown: - -.nf -\& $ exiv2 --verbose --version --grep xmlns -\& ... -\& xmlns=xmp:http://ns.adobe.com/xap/1.0/ -\& xmlns=dc:http://purl.org/dc/elements/1.1/ -\& ... -.fi - -To list the XMP prefixes and namespaces used by an image's metadata, in the -format: - -.nf -\& xmlns:= -.fi - -extract a sidecar file to stdout. For example, here, other data is not included: - -.nf -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 --extract X- Stonehenge.jpg -\& -\& -\& -\& \fP | \fI\fP-\fI\\fP ] text - -.TS -l l. -x-default The default value. If defined, a LangAlt string always lists this entry first -lang A language code as defined in \fIhttps://www.ietf.org/rfc/rfc3066.txt\fP -country A country code as defined in \fIhttps://www.ietf.org/rfc/rfc3066.txt\fP -text The text to use for a language definition -.TE - -The \fI\\fP-\fI\\fP combination is useful where a country uses a -different version of a common language (e.g. Swiss-French, would be -"fr-CH"). The \fI\\fP or \fI\\fP-\fI\\fP can be optionally -surrounded by double quotes (single quotes are not allowed). If no language -is specified, the default value is \fIx-default\fP. Any \fIx-default\fP entry is -always listed first. - -For example, 3 language definitions including a default value, a -British English value and a general French value: - -.nf -\& lang="x-default" Elevator, lang="en-gb" Lift, lang="fr" ascenseur -.fi - -.SS -\fBXMP structs\fP - -XMP structs group XmpText elements together in an array arrangement. The -elements themselves can contain other structs, allowing complex nested -array structures to be created. The tags in a struct use the extended XMP -version of the \fBExiv2 key syntax\fP. - -In a struct, the base key (e.g., Xmp.xmpMM.History) contains: - -\fBtype=\fP\fI\\fP - -where \fI\\fP is 'Alt' for XmpAlt, 'Bag' for XmpBag or 'Seq' for XmpSeq. - -Each numbered base key (e.g., Xmp.xmpMM.History[n]) contains the -string: `type="Struct"` and each numbered base key plus value type -(e.g. Xmp.xmpMM.History[n]/stEvt:action), contains the data. - -For example, the Xmp.xmpMM.History tag recording that a file has been -converted from tiff to JPEG, then saved. - -.nf -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& Xmp.xmpMM.History XmpText 0 type="Seq" -\& Xmp.xmpMM.History[1] XmpText 0 type="Struct" -\& Xmp.xmpMM.History[1]/stEvt:action XmpText 7 derived -\& Xmp.xmpMM.History[1]/stEvt:parameters XmpText 62 converted from image/tiff to image/jpeg, saved to new location -\& Xmp.xmpMM.History[2] XmpText 0 type="Struct" -\& Xmp.xmpMM.History[2]/stEvt:action XmpText 5 saved -\& Xmp.xmpMM.History[2]/stEvt:instanceID XmpText 40 xmp.iid:89A4EB97412C88632107D65978304F45 -\& Xmp.xmpMM.History[2]/stEvt:when XmpText 25 2021-08-13T10:12:09+01:00 -\& Xmp.xmpMM.History[2]/stEvt:softwareAgent XmpText 21 MySuperPhotoFixer 1.0 -.fi - -For an example of modifying a struct, see \fISetting an XMP struct value\fP. - -More information about structs is available from: \fIhttps://wwwimages2.adobe.com/content/dam/acom/en/devnet/xmp/pdfs/XMP%20SDK%20Release%20cc-2016-08/XMPSpecificationPart1.pdf#G5.873540\fP - -.ne 40 -.SH CONFIGURATION FILE -\fBexiv2\fP can read an optional configuration file, which allows -additional lens definitions to be added to translated output. On UNIX based -systems, this file is called \fI.exiv2\fP and on Windows, \fIexiv2.ini\fP. -The file is searched for first in the current directory, then in the -home directory (on UNIX based systems, \fI~/\fP and on Windows, \fI%USERPROFILE%\\\fP). -.sp 1 -You can determine the name of the file and where it is searched for, -with the command: -.sp 1 -.nf -\& $ exiv2 --verbose --version --grep config_path -\& exiv2 1.0.0.9 -\& config_path=/Users/rmills/.exiv2 -.fi -.sp 1 -The configuration file uses the Windows \fI.ini\fP format (see \fIhttps://en.wikipedia.org/wiki/INI_file\fP) -and has sections for each of the major camera manufactures: Canon, Minolta, -Nikon, Olympus, Pentax and Sony. The configuration file definitions override any existing -values. -.br -.sp 1 -For example, to add a new lens definition, first obtain the lensID for -your camera: -.sp 1 -.nf - -\& $ curl --silent -O https://clanmills.com/Stonehenge.jpg -\& $ exiv2 --print v --grep lens/i Stonehenge.jpg -\& 0x0083 Nikon3 LensType Byte 1 14 -\& 0x0084 Nikon3 Lens Rational 4 180/10 2500/10 35/10 63/10 -\& 0x008b Nikon3 LensFStops Undefined 4 55 1 12 0 -\& 0x000c NikonLd3 LensIDNumber Byte 1 146 -\& 0x000d NikonLd3 LensFStops Byte 1 55 -.fi -.sp 1 -Then using the 'LensIDNumber' value (i.e., 146), add the following text to -the configuration file: -.sp 1 -.nf -\& [nikon] -\& 146=Robin's Sigma Lens -.fi -.sp 1 -The text will now appear when the translated print option is used: -.sp 1 -.nf -\& $ exiv2 --print t --grep lens/i Stonehenge.jpg -\& Exif.Nikon3.LensType Byte 1 D G VR -\& Exif.Nikon3.Lens Rational 4 18-250mm F3.5-6.3 -\& Exif.Nikon3.LensFStops Undefined 4 4.58333 -\& Exif.NikonLd3.LensIDNumber Byte 1 Robin's Sigma Lens -\& Exif.NikonLd3.LensFStops Byte 1 F4.6 -.fi -.sp 1 -.ne 40 -.SH EXAMPLES -.TP -\fBexiv2\fP \fI*.jpg\fP -Prints a summary of the Exif information for all the JPEG files in the current -directory (the same as \fBexiv2\fP \fBprint\fP \fI*.jpg\fP). The summary -is brief and does not use the Family.Group.Tagname format. -.sp 1 -.TP -\fBexiv2\fP \fB--grep\fP \fIdate/i\fP \fIhttps://clanmills.com/Stonehenge.jpg\fP -Prints tags in \fIhttps://clanmills.com/Stonehenge.jpg\fP, where the key -(see \fBExiv2 key syntax\fP) contains the string \fIdate\fP (\fI/i\fP searches case -insensitive). When not including \fB--print\fP \fImode\fP or -\fB--Print\fP \fIflgs\fP, the default output becomes \fB--print\fP \fIa\fP -(i.e., print all). -.sp 1 -.TP -\fBexiv2\fP \fB--print\fP \fIi\fP \fIimage.jpg\fP -Prints the IPTC datasets in \fIimage.jpg\fP. -.sp 1 -.TP -\fBexiv2\fP \fB--Print\fP \fIkytEX\fP \fIimage.jpg\fP -Prints (with finer grained control) the Exif tags and XMP properties in -\fIimage.jpg\fP. The tag's key (see \fBExiv2 key syntax\fP), type and -translated value are displayed. -.sp 1 -.TP -\fBexiv2\fP \fBrename\fP \fIimage.jpg\fP -Renames \fIimage.jpg\fP (taken on 13\-Nov\-05 at 22:58:31) to 20051113_225831.jpg. -.sp 1 -.TP -\fBexiv2\fP \fB--rename\fP \fI":basename:_%Y-%m"\fP \fIimage.jpg\fP -Renames \fIimage.jpg\fP using the basename (i.e., '\fIimage\fP') and values -defined in \fBiconv_open\fP(3). e.g., image_2005-11.jpg. The values for time -and date are taken from the Exif metadata. -.sp 1 -.TP -\fBexiv2\fP \fB--extract\fP \fIt\fP \fIimage1.jpg\fP \fIimage2.jpg\fP -Extracts (copies) the Exif thumbnails from \fIimage1.jpg\fP into -image1-thumb.jpg and from \fIimage2.jpg\fP into image2-thumb.jpg. -.TP -.sp 1 -\fBexiv2\fP \fB--insert\fP \fIt\fP \fIimage1.jpg\fP \fIimage2.jpg\fP -Inserts (copies) thumbnails image1-thumb.jpg into \fIimage1.jpg\fP and -image2-thumb.jpg into \fIimage2.jpg\fP. -.sp 1 -.TP -\fBexiv2\fP \fB--extract\fP \fIp1,2\fP \fIimage.jpg\fP -Extracts (copies) previews 1 and 2 from \fIimage.jpg\fP, into image-preview1.jpg -and image-preview2.jpg. Use \fBexiv2\fP \fB--print\fP \fIp\fP \fIimage.jpg\fP -to display a list of available previews for \fIimage.jpg\fP. -.TP -\fBexiv2\fP \fB--extract\fP \fIX\fP \fIimage.jpg\fP -Extracts (copies) metadata tags from \fIimage.jpg\fP, into an XMP sidecar file, -image.xmp. In the process, this converts selected Exif tags and IPTC datasets to -XMP properties. -.sp 1 -.TP -\fBexiv2\fP \fB--insert\fP \fIX\fP \fIimage.jpg\fP -Inserts (copies) metadata from an XMP sidecar file, image.xmp, into \fIimage.jpg\fP. -The resulting Exif tags and IPTC datasets are converted from the equivalent XMP -properties in the sidecar file. -.sp 1 -.TP -\fBexiv2\fP \fB--extract\fP \fIX\fP \fB--Modify\fP "\fIadd Xmp.dc.subject Sunset\fP" \fIimage.jpg\fP -Extracts (copies) metadata tags from \fIimage.jpg\fP, applies \fB--Modify\fP -\fIcmd\fP to those tags and then saves in an XMP sidecar file, image.xmp. -While saving, selected Exif tags and IPTC datasets are converted to XMP properties. -Multiple \fB--Modify\fP \fIcmd\fP and \fB--modify\fP \fIcmdfile\fP can be used. -.sp 1 -.TP -\fBexiv2\fP \fB--extract\fP \fIX-\fP \fIimage1.jpg\fP | \fBexiv2\fP \fB--insert\fP \fIX-\fP \fIimage2.jpg\fP -Extracts (copies) the \fIimage1.jpg\fP metadata as XMP sidecar data and -inserts it directly into \fIimage2.jpg\fP. \fB--Modify\fP \fIcmd\fP and \fB--modify\fP -\fIcmdfile\fP can also be added when extracting from \fIimage1.jpg\fP. -.sp 1 -.TP -\fBexiv2\fP \fBdelete\fP \fIimage.jpg\fP -Deletes all the metadata in \fIimage.jpg\fP -.sp 1 -.TP -\fBexiv2\fP \fB--delete\fP \fItC\fP \fIimage.jpg\fP -Deletes the thumbnail and ICC profile in \fIimage.jpg\fP -.sp 1 -.TP -\fBexiv2\fP \fB--adjust\fP \fI1:00:00\fP \fIimage.jpg\fP -Adjusts Exif timestamps in \fIimage.jpg\fP, adding 1 hour -.sp 1 -.TP -\fBexiv2\fP \fB--Modify\fP \fI"set Exif.Photo.UserComment charset=Ascii New Exif comment"\fP \fIimage.jpg\fP -Sets the Exif comment in \fIimage.jpg\fP, to an ASCII string with the value '\fINew Exif comment\fP'. -.sp 1 -.TP -\fBexiv2\fP \fB--Modify\fP \fI"set Exif.GPSInfo.GPSLatitude 4/1 15/1 33/1"\fP \fB--Modify\fP \fI"set Exif.GPSInfo.GPSLatitudeRef N"\fP \fIimage.jpg\fP -Sets the latitude to 4 degrees, 15 minutes and 33 seconds north in -\fIimage.jpg\fP. The Exif standard stipulates that the GPSLatitude -tag consists of three Rational numbers for the degrees, minutes and -seconds of the latitude and GPSLatitudeRef contains either 'N' or 'S' -for north or south latitude respectively. - - -.TP -\fBexiv2 \--Modify\fP \fI"reg myprefix http://ns.myprefix.me/"\fP \fB\--Modify\fP \fI"add Xmp.myprefix.Whom Mr. Mills" Stonehenge.jpg\fP -Registers a new XMP namespace called 'http://ns.myprefix.me/' and a new -XMP group called 'myprefix'. This new Group has a new 'Whom' tag added to it. -.TP -\fBexiv2\fP \fB--location\fP \fI/tmp\fP \fB--suffix\fP \fI.CRW\fP \fI/data/*.JPG\fP -Copy all metadata from CRW files in the \fI/tmp\fP directory to JPG files -with corresponding basenames in the \fI/data\fP directory. Note that this -copies metadata as is, without any modifications to adapt it to the -requirements of the target format. Some tags copied like this may not make -sense in the target image. -.sp 1 -.TP -\fBexiv2\fP \fBfixiso\fP \fIimage.jpg\fP -Adds the Exif ISO metadata (if missing) to \fIimage.jpg\fP. This is for -Nikon and Canon cameras only and copies the camera maker's value into the Exif -metadata. -.SH ENVIRONMENT -.TP -\fBTZ\fP -This is the timezone to use when adjusting for daylight savings time (DST) and -affects the changing of the the time and date (e.g., when adjusting or -renaming). See \fIhttps://en.wikipedia.org/wiki/List_of_tz_database_time_zones\fP -for a list of valid values to use. The variable is not set by default for -Windows and an attempt is made to obtain the timezone from the OS. If this -fails, the DST rules for the United States are used. This can be corrected -by defining \fBTZ\fP. -.SH NOTES -For further help, see the Exiv2 wiki: \fIhttps://github.com/Exiv2/exiv2/wiki\fP -.SH BUGS -Report bugs to: \fIhttps://github.com/Exiv2/exiv2/issues\fP -.SH COPYRIGHT -The Exiv2 project is released under the GNU GPLv2 license: \fIhttps://github.com/Exiv2/exiv2/blob/main/COPYING\fP - -.SH SEE ALSO -.nf -\fBcurl\fP(1), \fBxmllint\fP(1), \fBiconv_open\fP(3), \fBstrftime\fP(3), - -Exiv2 'modify' command examples: \fIhttps://exiv2.org/sample.html#modify\fP -All Exiv2 tags, listing the \fIkey\fP and default \fItype\fP: \fIhttps://exiv2.org/metadata.html\fP -Exiv2 README.md: \fIhttps://github.com/Exiv2/exiv2/blob/main/README.md\fP -Exiv2 sample programs: \fIhttps://github.com/Exiv2/exiv2/blob/main/README-SAMPLES.md\fP -Exiv2 downloads: \fIhttps://www.exiv2.org/download.html\fP -Exiv2 wiki: \fIhttps://github.com/Exiv2/exiv2/wiki\fP -APEX Exposure values: \fIhttps://en.wikipedia.org/wiki/APEX_system\fP -XMP keys: \fIhttps://www.adobe.com/content/dam/acom/en/devnet/xmp/pdfs/XMPSDKReleasecc-2020/XMPSpecificationPart2.pdf#G4.1128133\fP -XMP structs: \fIhttps://wwwimages2.adobe.com/content/dam/acom/en/devnet/xmp/pdfs/XMP%20SDK%20Release%20cc-2016-08/XMPSpecificationPart1.pdf\fP -International Language Codes: \fIhttps://www.ietf.org/rfc/rfc3066.txt\fP -Windows INI format: \fIhttps://en.wikipedia.org/wiki/INI_file\fP -TZ Environment variable values: \fIhttps://en.wikipedia.org/wiki/List_of_tz_database_time_zones\fP -.fi - -.SH AUTHORS -.B exiv2 -was written by Andreas Huggel and others. - -.br -Exiv2 project website: \fIhttps://exiv2.org\fP -.br -Exiv2 source code: \fIhttps://github.com/exiv2/exiv2\fP +The Exiv2 manpage is available online. +.sp 1 +See: https://www.exiv2.org/manpage.html \ No newline at end of file diff --git a/man/man1/exiv2.md b/man/man1/exiv2.md new file mode 100644 index 00000000..40e4fc45 --- /dev/null +++ b/man/man1/exiv2.md @@ -0,0 +1,1718 @@ +
+ +# EXIV2(1) + +
+ +# NAME +exiv2 - Image metadata manipulation tool + +
+ +# SYNOPSIS +**exiv2** [ *options* ] [ *action* ] *file* ... + +
+ +# DESCRIPTION +**exiv2** is a program to read and write image metadata, including +Exif, IPTC, XMP, image comments, ICC Profile, thumbnails, image +previews and many vendor makernote tags. The program optionally +converts between Exif tags, IPTC datasets and XMP properties as +recommended by the Exif Standard, the IPTC Standard, the XMP +specification and the Metadata Working Group guidelines. + +
+ +### TABLE OF CONTENTS +1. [SYNOPSIS](#synopsis) +2. [DESCRIPTION](#description) +1. [FILE TYPES](#file_types) +2. [ACTIONS](#actions) +3. [COMMAND SUMMARY](#cmd_summary) +4. [OPTIONS](#options) +5. ['MODIFY' COMMANDS](#modify_cmds) + 1. [Quotations with 'modify' commands](#quotes_modify) + 2. ['Modify' command format](#mod_cmd_format) + 3. ['Modify' examples](#mod_examples) + 3. ['Modify' command file](#modify_cmd_file) +6. [EXIV2 GROUPS, TYPES AND VALUES](#groups_types_values) + 1. [Exiv2 tags](#exiv2_tags) + 2. [Exif/IPTC/XMP types](#exiv2_types) + 3. [Exiv2 key syntax](#exiv2_key_syntax) + 4. [Multiple elements](#multi_elements) + 5. [Duplicate Exif tags](#multi_exif_tags) + 6. [Date/Time formats](#date_time_fmts) + 7. [Exif 'Comment' values](#exif_comment_values) + 8. [XMP namespaces](#xmp_namespaces) + 9. [XMP LangAlt values](#langalt_values) + 10. [XMP structs](#xmp_structs) +7. [CONFIGURATION FILE](#config_file) +8. [EXAMPLES](#examples) +9. [ENVIRONMENT](#environment) +10. [NOTES](#notes) +11. [BUGS](#bugs) +12. [COPYRIGHT](#copyright) +13. [SEE ALSO](#see_also) +14. [AUTHORS](#authors) + +
+ +# FILE TYPES + +The following image formats and metadata categories are supported:
+ +Type | Exif | IPTC | XMP | Image Comments | ICC Profile | Thumbnail +|:---|:---- |:---- |:---- |:---- |:---- |:---- +ARW | Read | Read | Read | - | - | Read +AVIF | Read | Read | Read | - | - | Read +BMP | - | - | - | - | - | - +CR2 | Read/Write | Read/Write | Read/Write | - | Read/Write | Read/Write +CR3 | Read | Read | Read | - | Read | Read +CRW | Read/Write | - | - | Read/Write | - | Read/Write +DNG | Read/Write | Read/Write | Read/Write | - | Read/Write | Read/Write +EPS | - | - | Read/Write | | - | - +EXV | Read/Write | Read/Write | Read/Write | Read/Write | Read/Write | Read/Write +GIF | - | - | - | - | - | - +HEIC | Read | Read | Read | - | - | Read +HEIF | Read | Read | Read | - | - | Read +JP2 | Read/Write | Read/Write | Read/Write | - | Read/Write | Read/Write +JPEG | Read/Write | Read/Write | Read/Write | Read/Write | Read/Write | Read/Write +MRW | Read | Read | Read | - | - | Read +NEF | Read/Write | Read/Write | Read/Write | - | Read/Write | Read/Write +ORF | Read/Write | Read/Write | Read/Write | - | - | Read/Write +PEF | Read/Write | Read/Write | Read/Write | - | Read/Write | Read/Write +PGF | Read/Write | Read/Write | Read/Write | Read/Write | Read/Write | - +PNG | - | Read/Write | Read/Write | - | Read/Write | Read/Write +PSD | Read/Write | Read/Write | Read/Write | - | - | Read/Write +RAF | Read | Read | Read | - | - | Read +RW2 | Read | Read | Read | - | - | Read +SR2 | Read | Read | Read | - | - | Read +SRW | Read/Write | Read/Write | Read/Write | - | - | Read/Write +TGA | - | - | - | - | - | - +TIFF | Read/Write | Read/Write | Read/Write | - | Read/Write | Read/Write +WEBP | Read/Write | - | Read/Write | - | Read/Write | Read/Write +XMP | - |- | Read/Write | - | - | - + ++ Support for GIF, TGA and BMP images is minimal: the image format is +recognized, a MIME type assigned to it and the height and width of the +image are determined. + ++ Reading other TIFF-like RAW image formats, which are not listed in +the table, may also work. + ++ The thumbnail, if available, is included in the list of image previews. + +[TOC](#TOC) + +
+ +# ACTIONS +The *action* argument is only required if it is not clear from the +*options* which action is implied. + +
+ +### pr | print +Print image metadata. This is the default action, i.e. the command +`exiv2 image.jpg` will print a summary of the image Exif metadata. + +
+ +### ex | extract +Extract metadata to \*.exv, XMP sidecar (\*.xmp), preview image, +thumbnail or ICC profile file. Modification commands can be applied +on-the-fly. + +
+ +### in | insert +Insert metadata from corresponding \*.exv, XMP sidecar (\*.xmp), +thumbnail or ICC profile files. Use option [--suffix suf](#suffix_suf) +to change the suffix of the input files. Since files of any supported +format can be used as input files, this command can be used to copy +the metadata between files of different formats. Modification commands +can be applied on-the-fly. + +
+ +### rm | delete +Delete image metadata from the files. + +
+ +### ad | adjust +Adjust Exif timestamps by the given time. Requires at least one of the +options [--adjust time](#adjust_time), [--years +-n](#years_n), +[--months +-n](#months_n) or [--days +-n](#days_n). See [TZ environment variable](#TZ). + +
+ +### mo | modify +Apply commands to modify (add, set, delete) the Exif, IPTC and XMP +metadata of image files. Requires option [--comment txt](#comment_txt), +[--modify cmdfile](#modify_cmdfile) or [--Modify cmd](#Modify_cmd). + +
+ +### mv | rename +Rename files and/or set file timestamps according to the Exif create +timestamp. Uses the value of tag [Exif.Photo.DateTimeOriginal](https://www.exiv2.org/tags.html) +or, if not present, [Exif.Image.DateTime](https://www.exiv2.org/tags.html) +to determine the timestamp. The filename format can be set with [--rename fmt](#rename_fmt), +timestamp options are [--timestamp](#timestamp) and [--Timestamp](#Timestamp). +See [TZ environment variable](#TZ). + +
+ +### fi | fixiso +Copy the ISO setting from one of the proprietary Nikon or Canon +makernote ISO tags to the regular Exif ISO tag, +[Exif.Photo.ISOSpeedRatings](https://www.exiv2.org/tags.html). Does not +overwrite an existing Exif ISO tag. + +
+ +### fc | fixcom +Fix the character encoding of Exif Unicode user comments. Decodes the +comment using the auto-detected or specified character encoding and +writes it back in UCS-2. Use option [--encode enc](#encode_enc) to +specify the current encoding of the comment if necessary. + +[TOC](#TOC) + +
+ +# COMMAND SUMMARY + +**exiv2** [ **option** [ *arg* ] ]+ [ *action* ] *file* ...
+ +Where *file* contains image metadata, optionally specified using a URL +(http, https, ftp, sftp, data and file supported) or a wildcard pattern +(e.g., \*.jpg) + +| Option | Long option | Description | +|:------ |:---- |:---- | +| **-a** *time* | **--adjust** *time* | Automatically modify metadata time stamps. For the [adjust](#ad_adjust) action [[...]](#adjust_time) | +| **-b** | **--binary** | Obsolete and should not be used. Reserved for use with the test suite | +| **-c** *txt* | **--comment** *txt* | JPEG comment string to set in the image. For the [modify](#mo_modify) action [[...]](#comment_txt) | +| **-d** *tgt1* | **--delete** *tgt1* | Delete target(s) for the [delete](#rm_delete) action [[...]](#delete_tgt1) | +| **-D** *+-n* | **--days** *+-n* | Automated adjustment of the days in metadata dates [[...]](#days_n) | +| **-e** *tgt3* | **--extract** *tgt3* | Extract target(s) for the [extract](#ex_extract) action [[...]](#extract_tgt3) | +| **-f** | **--force** | Do not prompt before overwriting existing files. For the [rename](#mv_rename) and [extract](#ex_extract) actions [[...]](#force_Force) | +| **-F** | **--Force** | Do not prompt before renaming files. For the [rename](#mv_rename) and [extract](#ex_extract) actions [[...]](#force_Force) | +| **-g** *str* | **--grep** *str* | Only output where *str* matches in output text [[...]](#grep_str) | +| **-h** | **--help** | Display help and exit [[...]](#help) | +| **-i** *tgt2* | **--insert** *tgt2* | Insert target(s) for the [insert](#in_insert) action [[...]](#insert_tgt2) | +| **-k** | **--keep** | Preserve file timestamps when updating files [[...]](#keep) | +| **-K** *key* | **--key** *key* | Report a key. Similar to [--grep str](#grep_str), however *key* must match exactly [[...]](#key_key) | +| **-l** *dir* | **--location** *dir* | Location (directory) for files to be inserted or extracted [[...]](#location_dir) | +| **-m** *cmdfile* | **--modify** *cmdfile* | Read commands from a file. For the [modify](#mo_modify) action [[...]](#modify_cmdfile) | +| **-M** *cmd* | **--Modify** *cmd* | Modify the metadata with the command. For the [modify](#mo_modify) action [[...]](#Modify_cmd) | +| **-n** *enc* | **--encode** *enc* | Charset to decode Exif Unicode user comments [[...]](#encode_enc) | +| **-O** *+-n* | **--months** *+-n* | Automated adjustment of the months in metadata dates [[...]](#months_n) | +| **-p** *mod* | **--print** *mod* | Print report (common reports) [[...]](#print_mod) | +| **-P** *flg* | **--Print** *flg* | Print report (fine grained control) [[...]](#Print_flgs) | +| **-q** | **--quiet** | Silence warnings and error messages [[...]](#quiet) | +| **-Q** *lvl* | **--log** *lvl* | Set the log-level to 'd'(ebug), 'i'(nfo), 'w'(arning), 'e'(rror) or 'm'(ute) [[...]](#log_lvl) | +| **-r** *fmt* | **--rename** *fmt* | Filename format for the [rename](#mv_rename) action [[...]](#rename_fmt) | +| **-S** *suf* | **--suffix** *suf* | Use suffix for source files when using the [insert](#in_insert) command [[...]](#suffix_suf) | +| **-t** | **--timestamp** | Set the file timestamp from Exif metadata. For the [rename](#mv_rename) action [[...]](#timestamp) | +| **-T** | **--Timestamp** | Only set the file timestamp from Exif metadata. For the [rename](#mv_rename) action [[...]](#Timestamp) | +| **-u** | **--unknown** | Show unknown tags [[...]](#unknown) | +| **-v** | **--verbose** | Verbose [[...]](#verbose) | +| **-V** | **--version** | Show the program version and exit [[...]](#version) | +| **-Y** *+-n* | **--years** *+-n* | Automated adjustment of the years in metadata dates [[...]](#years_n) | + +The flags for those options are: + +
+ +| Parameter | Description | +|:------ |:---- | +| *action* | pr \| ex \| in \| rm \| ad \| mo \| mv \| fi \| fc
(print, extract, insert, delete, adjust, modify, rename, fixiso, fixcom) | +| *cmd* | (**set** \| **add**) *key* [[*type*] *value*] \| **del** *key* [*type*] \| **reg** *prefix* *namespace*
(see ['Modify' command format](#mod_cmd_format)) | +| *enc* | Values defined in [iconv_open(3)](https://linux.die.net/man/3/iconv_open) (e.g., UTF-8) | +| *flg* | E \| I \| X \| x \| g \| k \| l \| n \| y \| c \| s \| v \| t \| h
(Exif, IPTC, XMP, num, grp, key, label, name, type, count, size, vanilla, translated, hex) | +| *fmt* | Default format: %Y%m%d_%H%M%S | +| *key* | See [Exiv2 key syntax](#exiv2_key_syntax)) | +| *lvl* | d \| i \| w \| e
(debug, info, warning, error) | +| *mod* | s \| a \| e \| t \| v \| h \| i \| x \| c \| p \| C \| R \| S \| X
(summary, all, Exif, translated, vanilla, hex, IPTC, XMP, comment, preview, ICC Profile, Recursive Structure, Simple Structure, raw XMP) | +| *suf* | '.' then the file's extension (e.g., '.txt') | +| *time* | [ +\|-]HH[:MM[:SS[.mmm]]]
(Default is **+** when **+**/**-** are missing) | +| *tgt1* | a \| c \| e \| i \| I \| t \| x \| C \| -
(all, comment, Exif, IPTC, IPTC all, thumbnail, XMP, ICC Profile, stdin/out) | +| *tgt2* | a \| c \| e \| i \| t \| x \| C \| X \| XX \| -
(all, comment, Exif, IPTC, thumbnail, XMP, ICC Profile, SideCar, Raw XMP, stdin/out) | +| *tgt3* | a \| e \| i \| p \| t \| x \| C \| X \| XX \| -
(all, Exif, IPTC, preview, thumbnail, XMP, ICC Profile, SideCar, Raw XMP, stdin/out) | +| *type* | An Exif, IPTC or XMP tag type (e.g., xmpText). See [Exif/IPTC/XMP types](#exiv2_types) | +| *+-n* | The amount to change in the date (e.g., -3). Default is **+** when **+**/**-** are missing | + +[TOC](#TOC) + +
+ +# OPTIONS + +
+ +### **-h**, **--help** +Display help and exit. + +
+ +### **-V**, **--version** +Show the program version and exit. + +When **--version** is combined with [--verbose](#verbose), build +information is printed to standard output along with a list of shared +libraries which have been loaded into memory. Verbose version is +supported on Windows (MSVC, Cygwin and MinGW builds), macOS and Linux +and is provided for test and debugging. The library name and version +number are always printed, even if output is filtered with +[--grep str](#grep_str). + +
+ +### **-v**, **--verbose** +Be verbose during the program run. + +
+ +### **-q**, **--quiet** +Silence warnings and error messages during the program run. Note that +options **--quiet** and [--verbose](#verbose) can be used at the same +time. + +
+ +### **-Q** *lvl*, **--log** *lvl* +Set the log-level to 'd'(ebug), 'i'(nfo), 'w'(arning), 'e'(rror) +or 'm'(ute), with the *lvl* chosen including those below it +('d' <- 'i' <- 'w' <- 'e'). The default log-level is 'w'. **--log** *m* +is equivalent to [--quiet](#quiet). All log messages are written to +standard error. + +
+ +### **-u**, **--unknown** +Show unknown tags. Default is to suppress tags which don't have a name +(e.g., Exif.SonyMisc3c.0x022b). + +
+ +### **-g** *str*, **--grep** *str* +When printing tags, display only those where *str* is found in +the key (see [Exiv2 key syntax](#exiv2_key_syntax)). When +**--grep** *str* is used with [--verbose](#verbose) +[--version](#version), lines are included where *str* matches in the +variable or value. + +Multiple **--grep** *str* options can be used to output additional data: + +``` +$ exiv2 --verbose --version --grep webready --grep time +exiv2 1.0.0.9 +time=11:01:53 +enable_webready=1 +xmlns=mediapro:http://ns.iview-multimedia.com/mediapro/1.0/ +``` + +When the [--print mod](#print_mod) and [--Print flgs](#Print_flgs) +options are not specified, the default is [--print a](#print_mod): + +``` +$ curl --silent -O https://clanmills.com/Stonehenge.jpg +$ exiv2 --grep Date Stonehenge.jpg +Exif.Image.DateTime Ascii 20 2015:07:16 20:25:28 +Exif.Photo.DateTimeOriginal Ascii 20 2015:07:16 15:38:54 +Exif.Photo.DateTimeDigitized Ascii 20 2015:07:16 15:38:54 +Exif.NikonWt.DateDisplayFormat Byte 1 Y/M/D +Exif.GPSInfo.GPSDateStamp Ascii 11 2015:07:16 +Xmp.xmp.ModifyDate XmpText 25 2015-07-16T20:25:28+01:00 +``` + +You may use [--print mod](#print_mod) or [--Print flgs](#Print_flgs) to +further filter output ([--print s](#print_mod) is ignored): + +``` +$ exiv2 --print x --grep Date Stonehenge.jpg +Xmp.xmp.ModifyDate XmpText 25 2015-07-16T20:25:28+01:00 +``` + +*str* can contain an optional */i* modifier at the end, to indicate case +insensitivity: + +``` +$ exiv2 --print px --grep date/i Stonehenge.jpg +Xmp.xmp.ModifyDate XmpText 25 2015-07-16T20:25:28+01:00 +``` + +
+ +### **-K** *key*, **--key** *key* +Only reports tags for a given *key*, which must match the key exactly +(See [Exiv2 key syntax](#exiv2_key_syntax)). + +Multiple **--key** *key* options can be used to report more than a +single key: + +``` +$ curl --silent -O https://clanmills.com/Stonehenge.jpg +$ exiv2 --key Exif.Photo.DateTimeDigitized --key Exif.Photo.DateTimeOriginal Stonehenge.jpg +Exif.Photo.DateTimeOriginal Ascii 20 2015:07:16 15:38:54 +Exif.Photo.DateTimeDigitized Ascii 20 2015:07:16 15:38:54 +``` + +
+ +### **-n** *enc*, **--encode** *enc* +Charset to use when decoding Exif Unicode user comments, where *enc* is +a name understood by [iconv_open(3)](https://linux.die.net/man/3/iconv_open) +(e.g., 'UTF-8'). + +
+ +### **-k**, **--keep** +Preserve file timestamps when updating files. Can be used with +all options which update files and is ignored by read-only +options. + +
+ +### **-t**, **--timestamp** +Set the file timestamp according to the Exif create timestamp in +addition to renaming the file (overrides [--keep](#keep)). This option is +only used with the [rename](#mv_rename) action. See [TZ](#TZ) environment +variable. + +
+ +### **-T**, **--Timestamp** +Only set the file timestamp according to the Exif create timestamp, do +not rename the file (overrides [--keep](#keep)). This option is only used +with the [rename](#mv_rename) action. See [TZ environment variable](#TZ). + +
+ +### **-f**, **--force** or **-F**, **--Force** +These options are used by the [rename](#mv_rename) and +[extract](#ex_extract) actions to determine the file overwrite policy. +The options override the default behavior, which is to prompt the user if +the filename already exists. These options are usually combined with +[--verbose](#verbose), to provide additional status output. + +The [rename](#mv_rename) action will overwrite files when **--force** is +used. Instead, if **--Force** is used and the file already exists, the +new filename is appended with '_1' ('_2', ...) to prevent data loss. + +The [extract](#ex_extract) action will overwrite files when either +**--force** or **--Force** is used. + +For example, renaming a file using **--Force**, where the same filename +has already been renamed: + +``` +$ curl --silent -O https://clanmills.com/Stonehenge.jpg +$ exiv2 --verbose --Force rename Stonehenge.jpg +File 1/1: Stonehenge.jpg +Renaming file to ./20150716_153854.jpg + +$ curl --silent -O https://clanmills.com/Stonehenge.jpg +$ exiv2 --verbose --Force rename Stonehenge.jpg +File 1/1: Stonehenge.jpg +Renaming file to ./20150716_153854_1.jpg +``` + +
+ +### **-r** *fmt*, **--rename** *fmt* +Filename format for the [rename](#mv_rename) action (See [TZ](#TZ) +environment variable). The *fmt* string follows the definitions in +[strftime(3)](https://linux.die.net/man/3/strftime), using +[Exif.Photo.DateTimeOriginal](https://www.exiv2.org/tags.html) or +[Exif.Image.DateTime](https://www.exiv2.org/tags.html) as the reference +date and time. In addition, the following special character sequences are +also provided: + +| Variable | Description | +|:------ |:---- | +| :basename: | Original filename without extension | +| :dirname: | Name of the directory holding the original file | +| :parentname: | Name of parent directory | + +The default *fmt* is %Y%m%d_%H%M%S + +For example, renaming a file when *fmt* is made up of the basename, day, +short month and long year: +``` +$ curl --silent -O https://clanmills.com/Stonehenge.jpg +$ exiv2 --verbose --rename ':basename:_%d_%b_%Y' Stonehenge.jpg +File 1/1: Stonehenge.jpg +Renaming file to ./Stonehenge_16_Jul_2015.jpg +``` + +If the filename to rename to already exists and [--Force](#force_Force) +and [--force](#force_Force) are not used, the user is prompted for an +action. + +| Option | Description | +|:------ |:---- | +| [O]verwrite | Rename the file, overriding the existing one | +| [r]ename | Rename the file, but append '_1' ('_2', ...) to the new filename | +| [s]kip : | Cancel renaming this file | + +For example, when renaming a second Stonehenge.jpg file: +``` +$ curl --silent -O https://clanmills.com/Stonehenge.jpg +$ exiv2 --verbose --rename ':basename:_%d_%b_%Y' Stonehenge.jpg +File 1/1: Stonehenge.jpg +exiv2.exe: File `./Stonehenge_16_Jul_2015.jpg' exists. [O]verwrite, [r]ename or [s]kip? r +Renaming file to ./Stonehenge_16_Jul_2015_1.jpg +``` + +
+ +### **-a** *time*, **--adjust** *time* +Time adjustment, where *time* is in the format [-]HH[:MM[:SS]]. This +option is only used with the [adjust](#ad_adjust) action. See [TZ](#TZ) +environment variable. + +Examples of *time* are: + +| Time | Description | +|:------ |:---- | +| +1 | Adds one hour | +| 1:01 | Adds one hour and one minute | +| -0:00:30 | Subtracts 30 seconds | + +
+ +### **-Y** *+-n*, **--years** *+-n* +Time adjustment by a positive or negative number of years, for +the [adjust](#ad_adjust) action. See [TZ environment variable](#TZ). + +
+ +### **-O** *+-n*, **--months** *+-n* +Time adjustment by a positive or negative number of months, for +the [adjust](#ad_adjust) action. See [TZ environment variable](#TZ). + +
+ +### **-D** *+-n*, **--days** *+-n* +Time adjustment by a positive or negative number of days, for +the [adjust](#ad_adjust) action. See [TZ environment variable](#TZ). + +