1
|
<HTML>
|
2
|
<BODY bgcolor=pink>
|
3
|
<PRE>
|
4
|
<!-- Manpage converted by man2html 3.0.1 -->
|
5
|
|
6
|
</PRE>
|
7
|
<H2>SYNOPSIS</H2><PRE>
|
8
|
<B>exiv2</B> [<I>options</I>] [<I>action</I>] <I>file</I> ...
|
9
|
|
10
|
|
11
|
</PRE>
|
12
|
<H2>DESCRIPTION</H2><PRE>
|
13
|
<B>exiv2</B> is a program to read and write Exif, IPTC and XMP image metadata
|
14
|
and image comments. The following image formats are supported:
|
15
|
|
16
|
<B>Type</B> <B>Exif</B> <B>IPTC</B> <B>XMP</B> <B>Image</B> <B>comments</B>
|
17
|
-------------------------------------------------------------
|
18
|
JPEG Read/Write Read/Write Read/Write Read/Write
|
19
|
EXV Read/Write Read/Write Read/Write Read/Write
|
20
|
CR2 Read Read Read -
|
21
|
CRW Read/Write - - Read/Write
|
22
|
MRW Read Read Read -
|
23
|
TIFF Read/Write Read/Write Read/Write -
|
24
|
DNG Read/Write Read/Write Read/Write -
|
25
|
NEF Read/Write Read/Write Read/Write -
|
26
|
PEF Read/Write Read/Write Read/Write -
|
27
|
ARW Read Read Read -
|
28
|
RW2 Read Read Read -
|
29
|
SR2 Read Read Read -
|
30
|
SRW Read/Write Read/Write Read/Write -
|
31
|
ORF Read/Write Read/Write Read/Write -
|
32
|
PNG Read/Write Read/Write Read/Write Read/Write
|
33
|
PGF Read/Write Read/Write Read/Write Read/Write
|
34
|
RAF Read Read Read -
|
35
|
EPS - - Read/Write -
|
36
|
XMP - - Read/Write -
|
37
|
GIF - - - -
|
38
|
PSD Read/Write Read/Write Read/Write -
|
39
|
TGA - - - -
|
40
|
BMP - - - -
|
41
|
JP2 Read/Write Read/Write Read/Write -
|
42
|
|
43
|
<B>o</B> Support for GIF, TGA and BMP images is minimal: the image format is
|
44
|
recognized, a MIME type assigned to it and the height and width of
|
45
|
the image are determined.
|
46
|
|
47
|
<B>o</B> Reading other TIFF-like RAW image formats, which are not listed in
|
48
|
the table, may also work.
|
49
|
|
50
|
|
51
|
</PRE>
|
52
|
<H2>ACTIONS</H2><PRE>
|
53
|
The <I>action</I> argument is only required if it is not clear from the
|
54
|
<I>options</I> which action is implied.
|
55
|
|
56
|
<B>pr</B> <B>|</B> <B>print</B>
|
57
|
Print image metadata. This is the default action, i.e., the com-
|
58
|
mand <I>exiv2</I> <I>image.jpg</I> will print a summary of the image Exif
|
59
|
metadata.
|
60
|
|
61
|
<B>ex</B> <B>|</B> <B>extract</B>
|
62
|
Extract metadata to *.exv, XMP sidecar (*.xmp) and thumbnail
|
63
|
Adjust Exif timestamps by the given time. Requires at least one
|
64
|
of the options <B>-a</B> <I>time</I>, <B>-Y</B> <I>yrs</I>, <B>-O</B> <I>mon</I> or <B>-D</B> <I>day</I>.
|
65
|
|
66
|
<B>mo</B> <B>|</B> <B>modify</B>
|
67
|
Apply commands to modify (add, set, delete) the Exif, IPTC and
|
68
|
XMP metadata of image files. Requires option <B>-c</B>, <B>-m</B> or <B>-M</B>.
|
69
|
|
70
|
<B>mv</B> <B>|</B> <B>rename</B>
|
71
|
Rename files and/or set file timestamps according to the Exif
|
72
|
create timestamp. Uses the value of tag Exif.Photo.DateTimeOrig-
|
73
|
inal or, if not present, Exif.Image.DateTime to determine the
|
74
|
timestamp. The filename format can be set with <B>-r</B> <I>fmt</I>, timestamp
|
75
|
options are <B>-t</B> and <B>-T</B>.
|
76
|
|
77
|
<B>fi</B> <B>|</B> <B>fixiso</B>
|
78
|
Copy the ISO setting from one of the proprietary Nikon or Canon
|
79
|
makernote ISO tags to the regular Exif ISO tag,
|
80
|
Exif.Photo.ISOSpeedRatings. Does not overwrite an existing stan-
|
81
|
dard Exif ISO tag.
|
82
|
|
83
|
<B>fc</B> <B>|</B> <B>fixcom</B>
|
84
|
Fix the character encoding of Exif Unicode user comments.
|
85
|
Decodes the comment using the auto-detected or specified charac-
|
86
|
ter encoding and writes it back in UCS-2. Use option <B>-n</B> to spec-
|
87
|
ify the current encoding of the comment if necessary.
|
88
|
|
89
|
|
90
|
</PRE>
|
91
|
<H2>OPTIONS</H2><PRE>
|
92
|
<B>-h</B> Display help and exit.
|
93
|
|
94
|
<B>-V</B> Show the program version and exit.
|
95
|
|
96
|
<B>-v</B> Be verbose during the program run.
|
97
|
|
98
|
<B>-q</B> Silence warnings and error messages from the Exiv2 library dur-
|
99
|
ing the program run (quiet). Note that options <B>-v</B> and <B>-q</B> can be
|
100
|
used at the same time.
|
101
|
|
102
|
<B>-b</B> Show large binary values (default is to suppress them).
|
103
|
|
104
|
<B>-u</B> Show unknown tags (default is to suppress tags which don't have
|
105
|
a name).
|
106
|
|
107
|
<B>-g</B> <I>key</I> Only output info for this Exiv2 key (grep). Multiple <B>-g</B> options
|
108
|
can be used to grep info for several keys.
|
109
|
|
110
|
<B>-n</B> <I>enc</I> Charset to use to decode Exif Unicode user comments. <I>enc</I> is a
|
111
|
name understood by <B>iconv_open(3)</B>, e.g., 'UTF-8'.
|
112
|
|
113
|
<B>-k</B> Preserve file timestamps when updating files (keep). Can be used
|
114
|
with all options which update files. The flag is ignored by
|
115
|
read-only options.
|
116
|
|
117
|
('_2', ...) to the name of the new file.
|
118
|
|
119
|
<B>-a</B> <I>time</I>
|
120
|
Time adjustment in the format [-]HH[:MM[:SS]]. This option is
|
121
|
only used with the 'adjust' action. Examples: 1 adds one hour,
|
122
|
1:01 adds one hour and one minute, -0:00:30 subtracts 30 sec-
|
123
|
onds.
|
124
|
|
125
|
<B>-Y</B> <I>yrs</I> Time adjustment by a positive or negative number of years, for
|
126
|
the 'adjust' action.
|
127
|
|
128
|
<B>-O</B> <I>mon</I> Time adjustment by a positive or negative number of months, for
|
129
|
the 'adjust' action.
|
130
|
|
131
|
<B>-D</B> <I>day</I> Time adjustment by a positive or negative number of days, for
|
132
|
the 'adjust' action.
|
133
|
|
134
|
<B>-p</B> <I>mode</I>
|
135
|
Print mode for the 'print' action. Possible modes are:
|
136
|
s : print a summary of the Exif metadata (the default)
|
137
|
a : print Exif, IPTC and XMP metadata (shortcut for -Pkyct)
|
138
|
t : interpreted (translated) Exif tags (-PEkyct)
|
139
|
v : plain Exif tag values (-PExgnycv)
|
140
|
h : hexdump of the Exif data (-PExgnycsh)
|
141
|
i : IPTC datasets (-PIkyct)
|
142
|
x : XMP properties (-PXkyct)
|
143
|
c : JPEG comment
|
144
|
p : list available image previews, sorted by preview image size
|
145
|
in pixels
|
146
|
|
147
|
<B>-P</B> <I>flgs</I>
|
148
|
Print flags for fine control of the tag list ('print' action).
|
149
|
Allows control of the type of metadata as well as data columns
|
150
|
included in the print output. Valid flags are:
|
151
|
E : include Exif tags in the list
|
152
|
I : IPTC datasets
|
153
|
X : XMP properties
|
154
|
x : print a column with the tag number
|
155
|
g : group name
|
156
|
k : key
|
157
|
l : tag label
|
158
|
n : tag name
|
159
|
y : type
|
160
|
c : number of components (count)
|
161
|
s : size in bytes
|
162
|
v : plain data value
|
163
|
t : interpreted (translated) data
|
164
|
h : hexdump of the data
|
165
|
|
166
|
<B>-d</B> <I>tgt</I> Delete target(s) for the 'delete' action. Possible targets are:
|
167
|
a : all supported metadata (the default)
|
168
|
e : Exif section
|
169
|
|
170
|
<B>-e</B> <I>tgt</I> Extract target(s) for the 'extract' action. Possible targets are
|
171
|
the same as those for the <B>-d</B> option, plus a target to extract
|
172
|
preview images and a modifier to generate an XMP sidecar file:
|
173
|
p[<n>[,<m> ...]] : Extract preview images. The optional comma
|
174
|
separated list of preview image numbers is used to determine
|
175
|
which preview images to extract. The available preview images
|
176
|
and their numbers are displayed with the 'print' option -pp.
|
177
|
X : Extract metadata to an XMP sidecar file <file>.xmp. The
|
178
|
remaining extract targets determine what metadata to extract to
|
179
|
the sidecar file. Possible are Exif, IPTC and XMP and the
|
180
|
default is all of these.
|
181
|
|
182
|
<B>-r</B> <I>fmt</I> Filename format for the 'rename' action. The format string fol-
|
183
|
lows <B>strftime(3)</B> and supports the following keywords:
|
184
|
:basename: - original filename without extension
|
185
|
:dirname: - name of the directory holding the original file
|
186
|
:parentname: - name of parent directory
|
187
|
Default filename format is %Y%m%d_%H%M%S.
|
188
|
|
189
|
<B>-c</B> <I>txt</I> JPEG comment string to set in the image ('modify' action). This
|
190
|
option can also be used with the 'extract' and 'insert' actions
|
191
|
to modify metadata on-the-fly.
|
192
|
|
193
|
<B>-m</B> <I>file</I>
|
194
|
Command file for the 'modify' action. This option can also be
|
195
|
used with the 'extract' and 'insert' actions to modify metadata
|
196
|
on-the-fly.
|
197
|
|
198
|
<B>-M</B> <I>cmd</I> Command line for the 'modify' action. This option can also be
|
199
|
used with the 'extract' and 'insert' actions to modify metadata
|
200
|
on-the-fly. The format for the commands is the same as that of
|
201
|
the lines of a command file.
|
202
|
|
203
|
<B>-l</B> <I>dir</I> Location (directory) for files to be inserted or extracted.
|
204
|
|
205
|
<B>-S</B> <I>.suf</I>
|
206
|
Use suffix <I>.suf</I> for source files in 'insert' action.
|
207
|
|
208
|
|
209
|
</PRE>
|
210
|
<H2>COMMANDS</H2><PRE>
|
211
|
Commands for the 'modify' action can be read from a command file, e.g.,
|
212
|
|
213
|
exiv2 -m cmd.txt image.jpg
|
214
|
|
215
|
or given on the command line, as in
|
216
|
|
217
|
exiv2 -M"add Iptc.Application2.Credit String Mr. Smith" image.jpg
|
218
|
|
219
|
Note the quotes. Multiple <B>-m</B> and <B>-M</B> options can be combined.
|
220
|
|
221
|
When writing Exif, IPTC and XMP metadata, <B>exiv2</B> enforces only a correct
|
222
|
metadata structure. It is possible to write tags with types and values
|
223
|
vents you from adding duplicate Exif tags).
|
224
|
|
225
|
<B>del</B> Delete all occurrences of a tag (requires only a <I>key</I>).
|
226
|
|
227
|
<I>key</I> Exiv2 Exif, IPTC or XMP key.
|
228
|
|
229
|
<I>type</I> <B>Byte</B> <B>|</B> <B>Ascii</B> <B>|</B> <B>Short</B> <B>|</B> <B>Long</B> <B>|</B> <B>Rational</B> <B>|</B> <B>Undefined</B> <B>|</B> <B>SShort</B> <B>|</B>
|
230
|
<B>SLong</B> <B>|</B> <B>SRational</B> <B>|</B> <B>Comment</B> for Exif keys,
|
231
|
<B>String</B> <B>|</B> <B>Date</B> <B>|</B> <B>Time</B> <B>|</B> <B>Short</B> <B>|</B> <B>Undefined</B> for IPTC keys, and
|
232
|
<B>XmpText</B> <B>|</B> <B>XmpAlt</B> <B>|</B> <B>XmpBag</B> <B>|</B> <B>XmpSeq</B> <B>|</B> <B>LangAlt</B> for XMP keys.
|
233
|
|
234
|
A default <I>type</I> is used if none is explicitely given. The default
|
235
|
is determined based on <I>key</I>.
|
236
|
|
237
|
<I>value</I> The remaining text on the line is the value. It can optionally
|
238
|
be enclosed in single quotes ('<I>value</I>') or double quotes
|
239
|
("<I>value</I>").
|
240
|
|
241
|
The format of Exif <B>Comment</B> values includes an optional charset
|
242
|
specification at the beginning:
|
243
|
|
244
|
<B>[charset=Ascii|Jis|Unicode|Undefined</B> <B>]</B><I>comment</I>
|
245
|
|
246
|
<B>Undefined</B> is used by default if the value doesn't start with a
|
247
|
charset definition.
|
248
|
|
249
|
The format for IPTC <B>Date</B> values is YYYY-MM-DD (year, month,
|
250
|
day), that for IPTC <B>Time</B> values is HH:MM:SS+|-HH:MM, where
|
251
|
HH:MM:SS refers to local hour, minute and seconds and +|-HH:MM
|
252
|
refers to hours and minutes ahead or behind Universal Coordi-
|
253
|
nated Time (+|- means either a + or a - sign is required).
|
254
|
|
255
|
The format of XMP <B>LangAlt</B> values includes an optional language
|
256
|
qualifier:
|
257
|
|
258
|
<B>[lang=</B><I>language-code</I> <B>]</B><I>text</I>
|
259
|
|
260
|
<B>x-default</B> is used by default if the value doesn't start with a
|
261
|
language qualifier.
|
262
|
|
263
|
An additional command is available to register XMP namespaces:
|
264
|
|
265
|
<B>reg</B> <I>prefix</I> <I>namespace</I>
|
266
|
|
267
|
<B>Command</B> <B>file</B> <B>format</B>
|
268
|
Empty lines and lines starting with <B>#</B> in a command file are ignored
|
269
|
(comments). Remaining lines are commands as described above.
|
270
|
|
271
|
|
272
|
</PRE>
|
273
|
<H2>EXAMPLES</H2><PRE>
|
274
|
exiv2 *.jpg
|
275
|
Prints a summary of the Exif information for all JPEG files in
|
276
|
the directory.
|
277
|
|
278
|
exiv2 -it img1.jpg img2.jpg
|
279
|
Inserts (copies) metadata from img1.exv to img1.jpg and from
|
280
|
img2.exv to img2.jpg.
|
281
|
|
282
|
exiv2 -ep1,2 image.jpg
|
283
|
Extracts previews 1 and 2 from the image to the files image-pre-
|
284
|
view1.jpg and image-preview2.jpg.
|
285
|
|
286
|
exiv2 -eiX image.jpg
|
287
|
Extracts IPTC datasets into an XMP sidecar file image.xmp and in
|
288
|
the process converts them to "IPTC Core" XMP schema.
|
289
|
|
290
|
exiv2 -iixX image.jpg
|
291
|
Inserts IPTC and XMP metadata from an XMP sidecar file image.xmp
|
292
|
into image.jpg. The resulting IPTC datasets are converted from
|
293
|
the "IPTC Core" XMP schema properties in the sidecar file to the
|
294
|
older IPTC IIM4 format. The inserted XMP properties include
|
295
|
those in the "IPTC Core" XMP schema.
|
296
|
|
297
|
exiv2 -M"set Exif.Photo.UserComment charset=Ascii New Exif comment" image.jpg
|
298
|
Sets the Exif comment to an ASCII string.
|
299
|
|
300
|
exiv2 -M"set Exif.GPSInfo.GPSLatitude 4/1 15/1 33/1" \
|
301
|
-M"set Exif.GPSInfo.GPSLatitudeRef N" image.jpg
|
302
|
Sets the latitude to 4 degrees, 15 minutes and 33 seconds north.
|
303
|
The Exif standard stipulates that the GPSLatitude tag consists
|
304
|
of three Rational numbers for the degrees, minutes and seconds
|
305
|
of the latitude and GPSLatitudeRef contains either 'N' or 'S'
|
306
|
for north or south latitude respectively.
|
307
|
|
308
|
exiv2 insert -l/tmp -S.CRW /data/*.JPG
|
309
|
Copy all metadata from CRW files in the /tmp directory to JPG
|
310
|
files with corresponding basenames in the /data directory. Note
|
311
|
that this copies metadata as is, without any modifications to
|
312
|
adapt it to the requirements of the target format. Some tags
|
313
|
copied like this may not make sense in the target image.
|
314
|
|
315
|
|
316
|
</PRE>
|
317
|
<H2>SEE ALSO</H2><PRE>
|
318
|
<I>http://www.exiv2.org/sample.html#modify</I>
|
319
|
Sample command files.
|
320
|
|
321
|
<I>http://www.exiv2.org/metadata.html</I>
|
322
|
Taglists with <I>key</I> and default <I>type</I> values.
|
323
|
|
324
|
|
325
|
</PRE>
|
326
|
<H2>AUTHORS</H2><PRE>
|
327
|
<B>exiv2</B> was written by Andreas Huggel <ahuggel@gmx.net>.
|
328
|
|
329
|
This manual page was originally written by KELEMEN Peter
|
330
|
<fuji@debian.org>, for the Debian project.
|
331
|
|
332
|
|
333
|
</PRE>
|
334
|
<HR>
|
335
|
<ADDRESS>
|
336
|
Man(1) output converted with
|
337
|
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
|
338
|
</ADDRESS>
|
339
|
</BODY>
|
340
|
</HTML>
|