Project

General

Profile

Are the Exiv2 manual pages online » man_0.23.html

Robin Mills, 19 Apr 2012 14:29

 
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/Write   Read/Write   Read/Write   -
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>-Q</B> <I>lvl</I> Set the log-level to 'd'(ebug), 'i'(nfo), 'w'(arning), 'e'(rror)
103
              or  'm'(ute). The default log-level is 'w'. <B>-Qm</B> is equivalent to
104
              <B>-q</B>. All log messages are written to standard error.
105

    
106
       <B>-b</B>     Show large binary values (default is to suppress them).
107

    
108
       <B>-u</B>     Show unknown tags (default is to suppress tags which don't  have
109
              a name).
110

    
111
       <B>-g</B> <I>key</I> Only  output info for this Exiv2 key (grep). Multiple <B>-g</B> options
112
              can be used to grep info for several keys.
113

    
114
       <B>-n</B> <I>enc</I> Charset to use to decode Exif Unicode user comments.  <I>enc</I>  is  a
115
              name understood by <B>iconv_open(3)</B>, e.g., 'UTF-8'.
116

    
117
       <B>-f</B>     Do  not  prompt  before  overwriting existing files (force over-
118
              write).
119

    
120
       <B>-F</B>     Do not prompt before renaming files (Force rename). Appends '_1'
121
              ('_2', ...) to the name of the new file.
122

    
123
       <B>-a</B> <I>time</I>
124
              Time  adjustment  in  the format [-]HH[:MM[:SS]]. This option is
125
              only used with the 'adjust' action. Examples: 1 adds  one  hour,
126
              1:01  adds  one  hour and one minute, -0:00:30 subtracts 30 sec-
127
              onds.
128

    
129
       <B>-Y</B> <I>yrs</I> Time adjustment by a positive or negative number of  years,  for
130
              the 'adjust' action.
131

    
132
       <B>-O</B> <I>mon</I> Time  adjustment by a positive or negative number of months, for
133
              the 'adjust' action.
134

    
135
       <B>-D</B> <I>day</I> Time adjustment by a positive or negative number  of  days,  for
136
              the 'adjust' action.
137

    
138
       <B>-p</B> <I>mode</I>
139
              Print mode for the 'print' action. Possible modes are:
140
              s : print a summary of the Exif metadata (the default)
141
              a : print Exif, IPTC and XMP metadata (shortcut for -Pkyct)
142
              t : interpreted (translated) Exif tags (-PEkyct)
143
              v : plain Exif tag values (-PExgnycv)
144
              h : hexdump of the Exif data (-PExgnycsh)
145
              i : IPTC datasets (-PIkyct)
146
              x : XMP properties (-PXkyct)
147
              c : JPEG comment
148
              p  : list available image previews, sorted by preview image size
149
              in pixels
150

    
151
       <B>-P</B> <I>flgs</I>
152
              Print flags for fine control of the tag list  ('print'  action).
153
              Allows  control  of the type of metadata as well as data columns
154
              included in the print output.  Valid flags are:
155
              E : include Exif tags in the list
156
              I : IPTC datasets
157
              X : XMP properties
158
              x : print a column with the tag number
159
              g : group name
160
              k : key
161
              l : tag label
162
              n : tag name
163
              y : type
164
              c : number of components (count)
165
              s : size in bytes
166
              v : plain data value
167
              t : interpreted (translated) data
168
              h : hexdump of the data
169
              default is all of these. Note that the inserted  XMP  properties
170
              include those converted to Exif and IPTC.
171
              Only JPEG thumbnails can be inserted (not TIFF thumbnails), they
172
              need to be named <I>file</I>-thumb.jpg.
173

    
174
       <B>-e</B> <I>tgt</I> Extract target(s) for the 'extract' action. Possible targets are
175
              the  same  as  those for the <B>-d</B> option, plus a target to extract
176
              preview images and a modifier to generate an XMP sidecar file:
177
              p[&lt;n&gt;[,&lt;m&gt; ...]] : Extract preview images.  The  optional  comma
178
              separated  list  of  preview  image numbers is used to determine
179
              which preview images to extract. The  available  preview  images
180
              and their numbers are displayed with the 'print' option -pp.
181
              X  :  Extract  metadata  to  an XMP sidecar file &lt;file&gt;.xmp. The
182
              remaining extract targets determine what metadata to extract  to
183
              the  sidecar  file.  Possible  are  Exif,  IPTC  and XMP and the
184
              default is all of these.
185

    
186
       <B>-r</B> <I>fmt</I> Filename format for the 'rename' action. The format string  fol-
187
              lows <B>strftime(3)</B> and supports the following keywords:
188
              :basename:   - original filename without extension
189
              :dirname:    - name of the directory holding the original file
190
              :parentname: - name of parent directory
191
              Default filename format is %Y%m%d_%H%M%S.
192

    
193
       <B>-c</B> <I>txt</I> JPEG  comment string to set in the image ('modify' action). This
194
              option can also be used with the 'extract' and 'insert'  actions
195
              to modify metadata on-the-fly.
196

    
197
       <B>-m</B> <I>file</I>
198
              Command  file  for  the 'modify' action. This option can also be
199
              used with the 'extract' and 'insert' actions to modify  metadata
200
              on-the-fly.
201

    
202
       <B>-M</B> <I>cmd</I> Command  line  for  the 'modify' action. This option can also be
203
              used with the 'extract' and 'insert' actions to modify  metadata
204
              on-the-fly.   The format for the commands is the same as that of
205
              the lines of a command file.
206

    
207
       <B>-l</B> <I>dir</I> Location (directory) for files to be inserted or extracted.
208

    
209
       <B>-S</B> <I>.suf</I>
210
              Use suffix <I>.suf</I> for source files in 'insert' action.
211

    
212

    
213
</PRE>
214
<H2>COMMANDS</H2><PRE>
215
       Commands for the 'modify' action can be read from a command file, e.g.,
216

    
217
          exiv2 -m cmd.txt image.jpg
218

    
219
       or given on the command line, as in
220

    
221
          exiv2 -M"add Iptc.Application2.Credit String Mr. Smith" image.jpg
222

    
223
       <B>set</B>    Set the <I>value</I> of an existing tag with a matching <I>key</I> or add  the
224
              tag.
225

    
226
       <B>add</B>    Add a tag (unless <I>key</I> is a non-repeatable IPTC key; nothing pre-
227
              vents you from adding duplicate Exif tags).
228

    
229
       <B>del</B>    Delete all occurrences of a tag (requires only a <I>key</I>).
230

    
231
       <I>key</I>    Exiv2 Exif, IPTC or XMP key.
232

    
233
       <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>
234
              <B>SLong</B> <B>|</B> <B>SRational</B> <B>|</B> <B>Comment</B> for Exif keys,
235
              <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
236
              <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.
237

    
238
              A  default <I>type</I> is used if none is explicitly given. The default
239
              is determined based on <I>key</I>.
240

    
241
       <I>value</I>  The remaining text on the line is the value. It  can  optionally
242
              be   enclosed  in  single  quotes  ('<I>value</I>')  or  double  quotes
243
              ("<I>value</I>").
244

    
245
              The value is optional. Not providing any value is equivalent  to
246
              an  empty value ("") and is mainly useful to create an XMP array
247
              property, e.g., a bag.
248

    
249
              The format of Exif <B>Comment</B> values includes an  optional  charset
250
              specification at the beginning:
251

    
252
              <B>[charset=Ascii|Jis|Unicode|Undefined</B> <B>]</B><I>comment</I>
253

    
254
              <B>Undefined</B>  is  used by default if the value doesn't start with a
255
              charset definition.
256

    
257
              The format for IPTC <B>Date</B>  values  is  YYYY-MM-DD  (year,  month,
258
              day),  that  for  IPTC  <B>Time</B>  values  is HH:MM:SS+|-HH:MM, where
259
              HH:MM:SS refers to local hour, minute and seconds  and  +|-HH:MM
260
              refers  to  hours  and minutes ahead or behind Universal Coordi-
261
              nated Time (+|- means either a + or a - sign is required).
262

    
263
              The format of XMP <B>LangAlt</B> values includes an  optional  language
264
              qualifier:
265

    
266
              <B>[lang=</B><I>language-code</I> <B>]</B><I>text</I>
267

    
268
              <B>x-default</B>  is  used by default if the value doesn't start with a
269
              language qualifier.
270

    
271
       An additional command is available to register XMP namespaces:
272

    
273
       <B>reg</B> <I>prefix</I> <I>namespace</I>
274

    
275
              20051113_225831.jpg
276

    
277
       exiv2 -r':basename:_%Y%m' rename img_1234.jpg
278
              Renames img_1234.jpg to img_1234_200511.jpg
279

    
280
       exiv2 -et img1.jpg img2.jpg
281
              Extracts   the   Exif   thumbnails   from  the  two  files  into
282
              img1-thumb.jpg and img2-thumb.jpg.
283

    
284
       exiv2 -it img1.jpg img2.jpg
285
              Inserts (copies) metadata from img1.exv  to  img1.jpg  and  from
286
              img2.exv to img2.jpg.
287

    
288
       exiv2 -ep1,2 image.jpg
289
              Extracts previews 1 and 2 from the image to the files image-pre-
290
              view1.jpg and image-preview2.jpg.
291

    
292
       exiv2 -eiX image.jpg
293
              Extracts IPTC datasets into an XMP sidecar file image.xmp and in
294
              the process converts them to "IPTC Core" XMP schema.
295

    
296
       exiv2 -iixX image.jpg
297
              Inserts IPTC and XMP metadata from an XMP sidecar file image.xmp
298
              into image.jpg.  The resulting IPTC datasets are converted  from
299
              the "IPTC Core" XMP schema properties in the sidecar file to the
300
              older IPTC IIM4 format.  The  inserted  XMP  properties  include
301
              those in the "IPTC Core" XMP schema.
302

    
303
       exiv2 -M"set Exif.Photo.UserComment charset=Ascii New Exif comment" image.jpg
304
              Sets the Exif comment to an ASCII string.
305

    
306
       exiv2 -M"set Exif.GPSInfo.GPSLatitude 4/1 15/1 33/1" \
307
              -M"set Exif.GPSInfo.GPSLatitudeRef N" image.jpg
308
              Sets the latitude to 4 degrees, 15 minutes and 33 seconds north.
309
              The Exif standard stipulates that the GPSLatitude  tag  consists
310
              of  three  Rational numbers for the degrees, minutes and seconds
311
              of the latitude and GPSLatitudeRef contains either  'N'  or  'S'
312
              for north or south latitude respectively.
313

    
314
       exiv2 insert -l/tmp -S.CRW /data/*.JPG
315
              Copy  all  metadata  from CRW files in the /tmp directory to JPG
316
              files with corresponding basenames in the /data directory.  Note
317
              that  this  copies  metadata as is, without any modifications to
318
              adapt it to the requirements of the  target  format.  Some  tags
319
              copied like this may not make sense in the target image.
320

    
321

    
322
</PRE>
323
<H2>SEE ALSO</H2><PRE>
324
       <I>http://www.exiv2.org/sample.html#modify</I>
325
              Sample command files.
326

    
327
       <I>http://www.exiv2.org/metadata.html</I>
328
              Taglists with <I>key</I> and default <I>type</I> values.
329
</PRE>
330
<HR>
331
<ADDRESS>
332
Man(1) output converted with
333
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
334
</ADDRESS>
335
</BODY>
336
</HTML>
(9-9/9)