Makeover of exiv2.1

v0.27.3
Robin Mills 5 years ago
parent 4c733cd4fc
commit a22c03a517

@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps .\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1) .\" other parameters are allowed: see man(7), man(1)
.TH EXIV2 1 "April 25, 2020" .TH EXIV2 1 "April 29, 2020"
.\" Please adjust this date whenever revising the manpage. .\" Please adjust this date whenever revising the manpage.
.\" .\"
.\" Some roff macros, for reference: .\" Some roff macros, for reference:
@ -234,26 +234,24 @@ Exif.Photo.DateTimeDigitized Ascii 20 2015:07:16 15:38:54
Exif.NikonWt.DateDisplayFormat Byte 1 Y/M/D Exif.NikonWt.DateDisplayFormat Byte 1 Y/M/D
Exif.GPSInfo.GPSDateStamp Ascii 11 2015:07:16 Exif.GPSInfo.GPSDateStamp Ascii 11 2015:07:16
Xmp.xmp.ModifyDate XmpText 25 2015-07-16T20:25:28+01:00 Xmp.xmp.ModifyDate XmpText 25 2015-07-16T20:25:28+01:00
.fi .fi
.sp 1
You may use -pmod filters to further filter output. For example: You may use -pmod filters to further filter output. For example:
.nf .nf
$ bin/exiv2 -px -g Date http://clanmills.com/Stonehenge.jpg $ bin/exiv2 -px -g Date http://clanmills.com/Stonehenge.jpg
Xmp.xmp.ModifyDate XmpText 25 2015-07-16T20:25:28+01:00 Xmp.xmp.ModifyDate XmpText 25 2015-07-16T20:25:28+01:00
.fi .fi
.sp 1
The option -g (--grep) applies to keys and not values. The option -g (--grep) applies to keys and not values.
.br
The key may finish with the optional modifier /i to indicate case insensitive. The key may finish with the optional modifier /i to indicate case insensitive.
.TP .TP
.B \-K \fIkey\fP .B \-K \fIkey\fP
Only report data for given key. Only report data for given key.
.br .br
Multiple \fB\-K\fP options can be used to report more than a single key. Multiple \fB\-K\fP options can be used to report more than a single key.
.nf .nf
exiv2 \-K Exif.Photo.DateTimeDigitized -K Exif.Photo.DateTimeOriginal \-pt R.jpg $ exiv2 \-K Exif.Photo.DateTimeDigitized -K Exif.Photo.DateTimeOriginal \-pt R.jpg
Exif.Photo.DateTimeOriginal Ascii 20 2011:09:18 16:25:48 Exif.Photo.DateTimeOriginal Ascii 20 2011:09:18 16:25:48
Exif.Photo.DateTimeDigitized Ascii 20 2011:09:18 16:25:48 Exif.Photo.DateTimeDigitized Ascii 20 2011:09:18 16:25:48
.fi .fi
@ -468,20 +466,20 @@ Use suffix \fI.suf\fP for source files in 'insert' action.
Commands for the 'modify' action can be read from a command file, e.g., Commands for the 'modify' action can be read from a command file, e.g.,
.sp 1 .sp 1
.nf .nf
exiv2 \-m cmd.txt image.jpg $ exiv2 \-m cmd.txt image.jpg
.fi .fi
.sp 1 .sp 1
or given on the command line, as in or given on the command line, as in
.sp 1 .sp 1
.nf .nf
exiv2 \-M"add Iptc.Application2.Credit String Mr. Smith" image.jpg $ exiv2 \-M"add Iptc.Application2.Credit String Mr. Smith" image.jpg
.fi .fi
.sp 1 .sp 1
Note the quotes. Multiple \fB\-m\fP and \fB\-M\fP options can be combined, Note the quotes. Multiple \fB\-m\fP and \fB\-M\fP options can be combined,
and a non-standard XMP namespace registered. and a non-standard XMP namespace registered.
.sp 1 .sp 1
.nf .nf
exiv2 \-M"reg myprefix http://ns.myprefix.me/" \-M"add Xmp.myprefix.Whom Mr. Smith" \-M"set Exif.Image.Artist Mr. Smith" image.jpg $ exiv2 \-M"reg myprefix http://ns.myprefix.me/" \-M"add Xmp.myprefix.Whom Mr. Smith" \-M"set Exif.Image.Artist Mr. Smith" image.jpg
.fi .fi
.sp 1 .sp 1
When writing Exif, IPTC and XMP metadata, When writing Exif, IPTC and XMP metadata,
@ -512,23 +510,20 @@ prevents you from adding duplicate Exif tags).
.B del .B del
Delete all occurrences of a tag (requires only a \fIkey\fP). Delete all occurrences of a tag (requires only a \fIkey\fP).
.TP .TP
.I key .B key
Exiv2 Exif, IPTC or XMP key. Exiv2 Exif, IPTC or XMP key.
.TP .TP
.I type .B type
.B Byte | Ascii | Short | Long | Rational | Undefined | SShort | SLong | SRational | Comment Exif keys: Byte | Ascii | Short | Long | Rational | Undefined | SShort | SLong | SRational | Comment
for Exif keys,
.br .br
.B String | Date | Time | Short | Undefined IPTC keys: String | Date | Time | Short | Undefined
for IPTC keys, and
.br .br
.B XmpText | XmpAlt | XmpBag | XmpSeq | LangAlt XMP keys: XmpAlt | XmpBag | XmpSeq | LangAlt
for XMP keys.
.sp 1 .sp 1
A default \fItype\fP is used if none is explicitly given. The default A default \fItype\fP is used if none is explicitly given. The default
is determined based on \fIkey\fP. is determined based on \fIkey\fP.
.TP .TP
.I value .B value
The remaining text on the line is the value. It can optionally be The remaining text on the line is the value. It can optionally be
enclosed in single quotes ('\fIvalue\fP') or double quotes ("\fIvalue\fP"). enclosed in single quotes ('\fIvalue\fP') or double quotes ("\fIvalue\fP").
.sp 1 .sp 1
@ -541,7 +536,7 @@ specification at the beginning. Comments are used by the tags Exif.Photo.UserCo
and Exif.GPSInfo.GPSAreaInformation. Comments are stored as Undefined tags with an 8 byte encoding and Exif.GPSInfo.GPSAreaInformation. Comments are stored as Undefined tags with an 8 byte encoding
definition follow by the encoded data. The charset is specified as follows: definition follow by the encoded data. The charset is specified as follows:
.sp 1 .sp 1
.B [charset=Ascii|Jis|Unicode|Undefined] \fIcomment\fP [charset=Ascii|Jis|Unicode|Undefined] \fIcomment\fP
.br .br
charset=Undefined is the default charset=Undefined is the default
.sp 1 .sp 1
@ -566,19 +561,19 @@ $ exiv2 -pv --grep ProcessingMethod x.jpg
.fi .fi
.sp 1 .sp 1
The format for an IPTC \fBDate\fP value is: The format for an IPTC \fBDate\fP value is:
.sp 1 .br
YYYY\-MM\-DD (year, month, day) YYYY\-MM\-DD (year, month, day)
.sp 1 .sp 1
The format for an IPTC \fBTime\fP value is: The format for an IPTC \fBTime\fP value is:
.sp 1 .br
HH:MM:SS (hours, minutes, seconds) HH:MM:SS (hours, minutes, seconds)
.sp .br
and may optionally be followed by: and may optionally be followed by:
.sp 1 .br
\-HH:MM or +HH:MM (hours, minutes ahead/behind UTC) \-HH:MM or +HH:MM (hours, minutes ahead/behind UTC)
.sp 1 .sp 1
The format of \fBRational\fP (and \fBSRational\fP) is one of: The format of \fBRational\fP (and \fBSRational\fP) is one of:
.sp 1 .br
integer | integer/integer | Fnumber | number integer | integer/integer | Fnumber | number
.sp 1 .sp 1
Rational Examples: Rational Examples:
@ -615,7 +610,7 @@ $ exiv2 -M'set Xmp.dc.title All others pay cash' X.jpg
.sp 1 .sp 1
To remove a language specification, set the value to '' (empty string) To remove a language specification, set the value to '' (empty string)
.nf .nf
exiv2 -M'set Xmp.dc.title lang="en-US"' X.jpg $ exiv2 -M'set Xmp.dc.title lang="en-US"' X.jpg
.fi .fi
To remove all language specifications, delete the key: To remove all language specifications, delete the key:
.nf .nf
@ -624,25 +619,11 @@ $ exiv2 -M'del Xmp.dc.title' X.jpg
To register additional XMP namespaces, combine the command with: To register additional XMP namespaces, combine the command with:
.nf .nf
\fBreg\fP \fIprefix\fP \fInamespace\fP \fBreg\fP \fIprefix\fP \fInamespace\fP
.br
.SS Exif DateTime
.fi
An Exif DateTime string is stored as 20 ascii bytes (including trailing nul) in the format:
.sp 1
YYYY:MM:DD HH:MM:SS
.sp 1
The exiv2 command-line program options -t and -T will accept files
in which the Date has been incorrectly stored as YYYY-MM-DD.
The option -a enables the user to adjust the DateTime in the file and applies
the YYYY:MM:DD HH:MM:SS standard.
.ne 4
.fi .fi
.SS Command file format .SS Command file format
Empty lines and lines starting with \fB#\fP in a command file are Empty lines and lines starting with \fB#\fP in a command file are
ignored (comments). Remaining lines are commands as described above. ignored (comments). Remaining lines are commands as described above.
.br .br
.ne 40 .ne 40
.SH EXIF TAGNAMES AND VALUES .SH EXIF TAGNAMES AND VALUES
Exiv2 displays metadata tags and values. Exiv2 displays metadata tags and values.
@ -692,6 +673,19 @@ Type Explanation
.fi .fi
.sp .sp
The printing flag t = translated and is intended for human use. Scripts should never use translated values as they are localised and the format may change as Exiv2 evolves. The printing flag v reports the values recorded in the metadata and should be used by scripts. The printing flag t = translated and is intended for human use. Scripts should never use translated values as they are localised and the format may change as Exiv2 evolves. The printing flag v reports the values recorded in the metadata and should be used by scripts.
.ne 8
.fi
.SH Exif DateTime
.fi
An Exif DateTime string is stored as 20 ascii bytes (including trailing nul) in the format:
.sp 1
YYYY:MM:DD HH:MM:SS
.sp 1
The exiv2 command-line program options -t and -T will accept files
in which the Date has been incorrectly stored as YYYY-MM-DD.
The option -a enables the user to adjust the DateTime in the file and applies
the YYYY:MM:DD HH:MM:SS standard.
.sp 1
.ne 40 .ne 40
.SH CONFIGURATION FILE .SH CONFIGURATION FILE
Exiv2 can read an optional configuration file ~/.exiv2 on Unix systems and %USERPROFILE%\\exiv2.ini on Windows (using a Visual Studio build). Cygwin and MinGW/msys2 follow the unix convention and use ~/.exiv2 You can determine the location of the configuration file with the command: Exiv2 can read an optional configuration file ~/.exiv2 on Unix systems and %USERPROFILE%\\exiv2.ini on Windows (using a Visual Studio build). Cygwin and MinGW/msys2 follow the unix convention and use ~/.exiv2 You can determine the location of the configuration file with the command:
@ -714,84 +708,101 @@ $ cat ~/.exiv2
.sp 1 .sp 1
You obtain the lensID for your camera with the command: You obtain the lensID for your camera with the command:
.nf .nf
.sp 1
$ exiv2 -pv --grep lens/i http://clanmills.com/Stonehenge.jpg $ exiv2 -pv --grep lens/i http://clanmills.com/Stonehenge.jpg
0x0083 Nikon3 LensType Byte 1 14 0x0083 Nikon3 LensType Byte 1 14
0x0084 Nikon3 Lens Rational 4 180/10 2500/10 35/10 63/10 0x0084 Nikon3 Lens Rational 4 180/10 2500/10 35/10 63/10
0x008b Nikon3 LensFStops Undefined 4 55 1 12 0 0x008b Nikon3 LensFStops Undefined 4 55 1 12 0
0x000c NikonLd3 LensIDNumber Byte 1 146 <--- This number 0x000c NikonLd3 LensIDNumber Byte 1 146 <--- This number
0x000d NikonLd3 LensFStops Byte 1 55 0x000d NikonLd3 LensFStops Byte 1 55
.br .fi
.ne 40 .ne 40
.SH EXAMPLES .SH EXAMPLES
.TP .nf
exiv2 *.jpg $ exiv2 *.jpg
.fi
Prints a summary of the Exif information for all JPEG files in the directory. The summary report is rather brief and presentation does not use the Family.Group.Tag convention. Prints a summary of the Exif information for all JPEG files in the directory. The summary report is rather brief and presentation does not use the Family.Group.Tag convention.
.sp 1
If you use --grep pattern, the default becomes -pa. See -g/grep above. If you use --grep pattern, the default becomes -pa. See -g/grep above.
.sp 1
.nf .nf
$ exiv2 -g Date http://clanmills.com/Stonehenge.jpg $ exiv2 -g Date http://clanmills.com/Stonehenge.jpg
.fi .fi
.TP .nf
exiv2 \-pi image.jpg $ exiv2 \-pi image.jpg
.fi
Prints the IPTC metadata of the image. Prints the IPTC metadata of the image.
.TP .nf
exiv2 rename img_1234.jpg $ exiv2 rename img_1234.jpg
.sp 1
.fi
Renames img_1234.jpg (taken on 13\-Nov\-05 at 22:58:31) to 20051113_225831.jpg Renames img_1234.jpg (taken on 13\-Nov\-05 at 22:58:31) to 20051113_225831.jpg
.TP .nf
exiv2 \-r':basename:_%Y%m' rename img_1234.jpg $ exiv2 \-r'\:basename\:_%Y%m' rename img_1234.jpg
.sp 1
.fi
Renames img_1234.jpg to img_1234_200511.jpg Renames img_1234.jpg to img_1234_200511.jpg
.TP .nf
exiv2 \-et img1.jpg img2.jpg $ exiv2 \-et img1.jpg img2.jpg
.fi
Extracts the Exif thumbnails from the two files into img1\-thumb.jpg Extracts the Exif thumbnails from the two files into img1\-thumb.jpg
and img2\-thumb.jpg. and img2\-thumb.jpg.
.TP .nf
exiv2 \-it img1.jpg img2.jpg $ exiv2 \-it img1.jpg img2.jpg
.fi
Inserts (copies) metadata from img1.exv to img1.jpg and from img2.exv Inserts (copies) metadata from img1.exv to img1.jpg and from img2.exv
to img2.jpg. to img2.jpg.
.TP .nf
exiv2 \-ep1,2 image.jpg $ exiv2 \-ep1,2 image.jpg
.fi
Extracts previews 1 and 2 from the image to the files image\-preview1.jpg Extracts previews 1 and 2 from the image to the files image\-preview1.jpg
and image\-preview2.jpg. and image\-preview2.jpg.
.TP .nf
exiv2 \-eiX image.jpg $ exiv2 \-eiX image.jpg
.fi
Extracts IPTC datasets into an XMP sidecar file image.xmp and in the Extracts IPTC datasets into an XMP sidecar file image.xmp and in the
process converts them to "IPTC Core" XMP schema. process converts them to "IPTC Core" XMP schema.
.TP .nf
exiv2 \-iixX image.jpg $ exiv2 \-iixX image.jpg
.fi
Inserts IPTC and XMP metadata from an XMP sidecar file image.xmp into Inserts IPTC and XMP metadata from an XMP sidecar file image.xmp into
image.jpg. The resulting IPTC datasets are converted from the "IPTC image.jpg. The resulting IPTC datasets are converted from the "IPTC
Core" XMP schema properties in the sidecar file to the older IPTC IIM4 Core" XMP schema properties in the sidecar file to the older IPTC IIM4
format. The inserted XMP properties include those in the "IPTC Core" format. The inserted XMP properties include those in the "IPTC Core"
XMP schema. XMP schema.
.TP .nf
exiv2 \-M"set Exif.Photo.UserComment charset=Ascii New Exif comment" image.jpg $ exiv2 \-M"set Exif.Photo.UserComment charset=Ascii New Exif comment" image.jpg
.fi
Sets the Exif comment to an ASCII string. Sets the Exif comment to an ASCII string.
.TP .nf
exiv2 \-M"set Exif.GPSInfo.GPSLatitude 4/1 15/1 33/1" \\ \-M"set Exif.GPSInfo.GPSLatitudeRef N" image.jpg $ exiv2 \-M"set Exif.GPSInfo.GPSLatitude 4/1 15/1 33/1" \\ \-M"set Exif.GPSInfo.GPSLatitudeRef N" image.jpg
.fi
Sets the latitude to 4 degrees, 15 minutes and 33 seconds north. The Sets the latitude to 4 degrees, 15 minutes and 33 seconds north. The
Exif standard stipulates that the GPSLatitude tag consists of three Exif standard stipulates that the GPSLatitude tag consists of three
Rational numbers for the degrees, minutes and seconds of the latitude Rational numbers for the degrees, minutes and seconds of the latitude
and GPSLatitudeRef contains either 'N' or 'S' for north or south and GPSLatitudeRef contains either 'N' or 'S' for north or south
latitude respectively. latitude respectively.
.TP .nf
exiv2 insert \-l/tmp -S.CRW /data/*.JPG $ exiv2 insert \-l/tmp -S.CRW /data/*.JPG
.fi
Copy all metadata from CRW files in the /tmp directory to JPG files Copy all metadata from CRW files in the /tmp directory to JPG files
with corresponding basenames in the /data directory. Note that this dwith corresponding basenames in the /data directory. Note that this
copies metadata as is, without any modifications to adapt it to the copies metadata as is, without any modifications to adapt it to the
requirements of the target format. Some tags copied like this may not requirements of the target format. Some tags copied like this may not
make sense in the target image. make sense in the target image.
.SH SEE ALSO .SH SEE ALSO
.TP .nf
.I https://exiv2.org/sample.html#modify .I https://exiv2.org/sample.html#modify
.fi
Sample command files. Sample command files.
.TP .nf
.I https://exiv2.org/metadata.html .I https://exiv2.org/metadata.html
.fi
Taglists with \fIkey\fP and default \fItype\fP values. Taglists with \fIkey\fP and default \fItype\fP values.
.SH AUTHORS .SH AUTHORS
.B exiv2 .B exiv2
was written by Andreas Huggel and others. The Exiv2 project web site is https://exiv2.org. The code is hosted on GitHub at https://github.com/exiv2/exiv2 was written by Andreas Huggel and others.
.PP .SH PROJECT
This manual page was originally created for the Debian project by KELEMEN Peter <fuji@debian.org>. The Exiv2 project web site is https://exiv2.org.
.sp 1
The code is hosted on GitHub at https://github.com/exiv2/exiv2

Loading…
Cancel
Save