-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanpage.html
1117 lines (933 loc) · 42.6 KB
/
manpage.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!--*- sgml -*-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="author" content="Exiv2 contributors">
<meta name="description" content="Open Source Exif, IPTC and XMP metadata library and tools with Exif MakerNote and read/write support">
<meta name="keywords" content="exif, iptc, xmp, metadata, makernote, manipulation, manipulate, read and write, write, change, update, jpeg, jpg, ifd, image file directory, thumbnail, thumbnails, tag, tags, canon, fujifilm, sigma/foveon, nikon, open source, opensource">
<link rel="apple-touch-icon" sizes="57x57" href="/icons/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/icons/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/icons/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/icons/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/icons/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/icons/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/icons/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/icons/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/icons/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/icons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png">
<link rel="manifest" href="/icons/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/icons/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<title>Exiv2 - Image metadata library and tools</title>
<!-- Doxygen styles -->
<link href="doc/doxygen.css" rel="stylesheet" type="text/css">
<link href="doc/customdoxygen.css" rel="stylesheet" type="text/css">
<!-- Bootstrap core CSS -->
<link href="dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap theme -->
<link href="dist/css/bootstrap-theme.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="include/exiv2.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<nav class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">
<img alt="Exiv2" src="include/exiv2-logo-small.png">
</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="getting-started.html">Getting started</a></li>
<li><a href="download.html">Download</a></li>
<li><a href="whatsnew.html">What's New</a></li>
<li><a href="metadata.html">Metadata</a></li>
<li><a href="makernote.html">Makernote</a></li>
<li><a href="doc/examples.html">Examples</a></li>
<li><a href="doc/index.html">API</a></li>
<li class="active"><a href="manpage.html">Manual</a></li>
<li><a href="book/index.html">Book</a></li>
<li><a href="https://github.com/exiv2/exiv2" target="_blank">GitHub</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="container">
<div class="page-header">
<h1>Exiv2 utility manual</h1>
</div>
<p class="lead">A Unix-style "manpage" for the Exiv2 command line utility.
</p>
<a href="exiv2-manpage.pdf" title="Exiv2 man page (PDF)" class="btn btn-danger margin-bottom-m">
<span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span> Download PDF
</a>
Content-type: text/html; charset=UTF-8
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of EXIV2</TITLE>
</HEAD><BODY>
<H1>EXIV2</H1>
Section: User Commands (1)<BR>Updated: August 10, 2021<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
<H2>NAME</H2>
exiv2 - Image metadata manipulation tool
<A NAME="lbAC"> </A>
<H2>SYNOPSIS</H2>
<B>exiv2</B>
[<I>options</I>] [<I>action</I>] <I>file</I> ...
<BR>
<A NAME="lbAD"> </A>
<H2>DESCRIPTION</H2>
<P>
<B>exiv2</B>
is a program to read and write Exif, IPTC, XMP metadata and
image comments and can read many vendor makernote tags. The program
optionally converts between Exif tags, XMP properties and IPTC
datasets as recommended by the Exif Standard, the IPTC Standard,
the XMP specification and Metadata Working Group guidelines.
<BR>
The following image formats are supported:
<TABLE>
<TR VALIGN=top><TD><B>Type</B></TD><TD><B>Exif</B></TD><TD><B>IPTC</B></TD><TD><B>XMP</B></TD><TD><B>Image Comments</B></TD><TD><B>ICC Profile</B><BR></TD></TR>
<TR VALIGN=top><TD><HR></TD><TD><HR></TD><TD><HR></TD><TD><HR></TD><TD><HR></TD><TD><HR></TD></TR>
<TR VALIGN=top><TD>AVIF</TD><TD>Read</TD><TD>Read</TD><TD>Read</TD><TD>-</TD><TD>-<BR></TD></TR>
<TR VALIGN=top><TD>BMP</TD><TD>-</TD><TD>-</TD><TD>-</TD><TD>-</TD><TD>-<BR></TD></TR>
<TR VALIGN=top><TD>CR2</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>-</TD><TD>Read/Write<BR></TD></TR>
<TR VALIGN=top><TD>CR3</TD><TD>Read</TD><TD>Read</TD><TD>Read</TD><TD>-</TD><TD>Read<BR></TD></TR>
<TR VALIGN=top><TD>CRW</TD><TD>Read/Write</TD><TD>-</TD><TD>-</TD><TD>Read/Write</TD><TD>-<BR></TD></TR>
<TR VALIGN=top><TD>DNG</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>-</TD><TD>Read/Write<BR></TD></TR>
<TR VALIGN=top><TD>EPS</TD><TD>-</TD><TD>-</TD><TD>Read/Write</TD><TD>-</TD><TD>-<BR></TD></TR>
<TR VALIGN=top><TD>EXV</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>Read/Write Read/Write</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>GIF</TD><TD>-</TD><TD>-</TD><TD>-</TD><TD>-</TD><TD>-<BR></TD></TR>
<TR VALIGN=top><TD>HEIC</TD><TD>Read</TD><TD>Read</TD><TD>Read</TD><TD>-</TD><TD>-<BR></TD></TR>
<TR VALIGN=top><TD>HEIF</TD><TD>Read</TD><TD>Read</TD><TD>Read</TD><TD>-</TD><TD>-<BR></TD></TR>
<TR VALIGN=top><TD>JP2</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>-</TD><TD>Read/Write<BR></TD></TR>
<TR VALIGN=top><TD>JPEG</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>Read/Write<BR></TD></TR>
<TR VALIGN=top><TD>MRW</TD><TD>Read</TD><TD>Read</TD><TD>Read</TD><TD>-</TD><TD>-<BR></TD></TR>
<TR VALIGN=top><TD>NEF</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>-</TD><TD>Read/Write<BR></TD></TR>
<TR VALIGN=top><TD>ORF</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>-</TD><TD>-<BR></TD></TR>
<TR VALIGN=top><TD>PEF</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>-</TD><TD>Read/Write<BR></TD></TR>
<TR VALIGN=top><TD>PGF</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>Read/Write<BR></TD></TR>
<TR VALIGN=top><TD>PNG</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>Read/Write<BR></TD></TR>
<TR VALIGN=top><TD>PSD</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>-</TD><TD>-<BR></TD></TR>
<TR VALIGN=top><TD>RAF</TD><TD>Read</TD><TD>Read</TD><TD>Read</TD><TD>-</TD><TD>-<BR></TD></TR>
<TR VALIGN=top><TD>RW2</TD><TD>Read</TD><TD>Read</TD><TD>Read</TD><TD>-</TD><TD>-<BR></TD></TR>
<TR VALIGN=top><TD>SR2</TD><TD>Read</TD><TD>Read</TD><TD>Read</TD><TD>-</TD><TD>-<BR></TD></TR>
<TR VALIGN=top><TD>SRW</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>-</TD><TD>-<BR></TD></TR>
<TR VALIGN=top><TD>TGA</TD><TD>-</TD><TD>-</TD><TD>-</TD><TD>-</TD><TD>-<BR></TD></TR>
<TR VALIGN=top><TD>TIFF</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>Read/Write</TD><TD>-</TD><TD>Read/Write<BR></TD></TR>
<TR VALIGN=top><TD>WEBP</TD><TD>Read/Write</TD><TD>-</TD><TD>Read/Write</TD><TD>-</TD><TD>Read/Write<BR></TD></TR>
<TR VALIGN=top><TD>XMP</TD><TD>-</TD><TD>-</TD><TD>Read/Write</TD><TD>-</TD><TD>-<BR></TD></TR>
</TABLE>
<DL COMPACT>
<DT>•<DD>
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.
<DT>•<DD>
Reading other TIFF-like RAW image formats, which are not listed in the
table, may also work.
</DL>
<A NAME="lbAE"> </A>
<H2>ACTIONS</H2>
The <I>action</I> argument is only required if it is not clear from the
<I>options</I> which action is implied.
<DL COMPACT>
<DT><B>pr | print</B>
<DD>
Print image metadata. This is the default action, i.e., the command
<I>exiv2 image.jpg</I> will print a summary of the image Exif metadata.
<DT><B>ex | extract</B>
<DD>
Extract metadata to *.exv, XMP sidecar (*.xmp) and thumbnail image files.
Modification commands can be applied on-the-fly.
<DT><B>in | insert</B>
<DD>
Insert metadata from corresponding *.exv, XMP sidecar (*.xmp) and
thumbnail files. Use option <B>-S</B> <I>.suf</I> 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.
<DT><B>rm | delete</B>
<DD>
Delete image metadata from the files.
<DT><B>ad | adjust</B>
<DD>
Adjust Exif timestamps by the given time. Requires at least one 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>.
<DT><B>mo | modify</B>
<DD>
Apply commands to modify (add, set, delete) the Exif, IPTC and XMP
metadata of image files. Requires option <B>-c</B>, <B>-m</B> or
<B>-M</B>.
<DT><B>mv | rename</B>
<DD>
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 <B>-r</B> <I>fmt</I>, timestamp options
are <B>-t</B> and <B>-T</B>.
<DT><B>fi | fixiso</B>
<DD>
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.
<DT><B>fc | fixcom</B>
<DD>
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 <B>-n</B> to specify the current
encoding of the comment if necessary.
<BR>
</DL>
<A NAME="lbAF"> </A>
<H2>COMMAND SUMMARY</H2>
<P>
<PRE>
exiv2 [ opt [arg] ]+ [ act ] file ...
option [arg] long option description
-a tim --adjust Modify time stamps. [+|-]HH[:MM[:SS[.mmm]]]
-b --binary This option is obsolete and should not be used. Reserved for test suite (with option -pC)
-c txt --comment JPEG comment string to set in the image ('modify' action). ...
-d tgt --delete Delete target(s) for the 'delete' action. ...
-D +-n --days Time adjustment by a positive or negative number of days ...
-e tgt --extract Extract target(s) for the 'extract' action.
-f --force Do not prompt before overwriting existing files ...
-F --Force Do not prompt before renaming files (Force rename) ...
-g key --grep Only output info for this Exiv2 key
-h --help Display help and exit.
-i tgt --insert Insert target(s) for the 'insert' action. ...
-k --keep Preserve file timestamps when updating files
-K key --key Report key. Similar to -g (grep) however key must match exactly.
-l dir --location Location (directory) for files to be inserted or extracted.
-m file --modify read commands from cmd-file
-M cmd --Modify Command line for the 'modify' action. ...
-n enc --encode Charset to decode Exif Unicode user comments. See: man 3 iconv_open
-O +-n --months Time adjustment by a positive or negative number of months, ...
-p mod --print Print report (common reports)
-P flg --Print Print report (fine grained control)
-q --quiet Silence warnings and error messages from the Exiv2 library ...
-Q lvl --log Set the log-level to 'd'(ebug), 'i'(nfo), 'w'(arning), 'e'(rror)
-r fmt --rename Filename format for the 'rename' action. ...
-S suf --suffix Use suffix .suf for source files for insert command.
-t --timestamp Set the file timestamp according to the Exif create timestamp ...
-T --Timestamp Only set the file timestamp according to Exif create timestamp ...
-u --unknown Show unknown tags ...
-v --verbose verbose
-V --version Show the program version and exit.
-Y +-n --years Time adjustment by a positive or negative number of years ...
act pr | ex | in | rm | ad | mo | mv | fi | fc
print, extract, insert, delete, adjust, modify, rename, fixiso, fixcom
cmd See "Commands" below.
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 is %Y%m%d_%H%M%S.
lvl d | i | i | w | e
debug, info, warning, error
mod s | a | e | t | v | h | i | x | c | p | i | C | R | S | X
summary, all, exif, translated, vanilla, hex, iptc, xmp, comment, preview,
ICC Profile, Recursive Structure, Simple Structure, raw XMP
tgt a | c | e | i | p | t | x | C | X | XX | -
all, comment, exif, iptc, preview, thumb, xmp, ICC Profile, SideCar, RawXMP, stdin/out
</PRE>
<A NAME="lbAG"> </A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT><B>-h</B>
<DD>
Display help and exit.
<DT><B>-V</B>
<DD>
Show the program version and exit.
<BR>
When <B>-V</B> is combined with <B>-v</B> (Verbose version), 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.
<DT><B>-v</B>
<DD>
Be verbose during the program run.
<DT><B>-q</B>
<DD>
Silence warnings and error messages from the Exiv2 library during the
program run (quiet). Note that options <B>-v</B> and <B>-q</B> can be
used at the same time.
<DT><B>-Q </B><I>lvl</I>
<DD>
Set the log-level to 'd'(ebug), 'i'(nfo), 'w'(arning), 'e'(rror)
or 'm'(ute). The default log-level is 'w'. <B>-Qm</B> is equivalent
to <B>-q</B>. All log messages are written to standard error.
<DT><B>-u</B>
<DD>
Show unknown tags (default is to suppress tags which don't have a name).
<DT><B>-g </B><I>key</I>
<DD>
Only keys which match the given key (grep).
<BR>
Multiple <B>-g</B> options
can be used to filter info to less keys. Example:
exiv2 -v -V -g webready -g time.
The default exiv2 command prints a "summary report" which is quite short. When you use -g without a -pmod option, you do not get a summary report and in effect you get -g pattern -pa image ...
<P>
<PRE>
$ bin/exiv2 -g Date <A HREF="http://clanmills.com/Stonehenge.jpg">http://clanmills.com/Stonehenge.jpg</A>
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
</PRE>
<P>
You may use -pmod filters to further filter output. For example:
<PRE>
$ bin/exiv2 -px -g Date <A HREF="http://clanmills.com/Stonehenge.jpg">http://clanmills.com/Stonehenge.jpg</A>
Xmp.xmp.ModifyDate XmpText 25 2015-07-16T20:25:28+01:00
</PRE>
<P>
The option -g (--grep) applies to keys and not values.
<BR>
The key may finish with the optional modifier /i to indicate case insensitive.
<DT><B>-K </B><I>key</I>
<DD>
Only report data for given key.
<BR>
Multiple <B>-K</B> options can be used to report more than a single key.
<PRE>
$ 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.DateTimeDigitized Ascii 20 2011:09:18 16:25:48
</PRE>
<DT><B>-n </B><I>enc</I>
<DD>
Charset to use to decode Exif Unicode user comments. <I>enc</I> is
a name understood by <B><A HREF="/cgi-bin/man/man2html?3+iconv_open">iconv_open</A></B>(3), e.g., 'UTF-8'.
<DT><B>-k</B>
<DD>
Preserve file timestamps when updating files (keep). Can be used with
all options which update files. The flag is ignored by read-only
options.
<DT><B>-t</B>
<DD>
Set the file timestamp according to the Exif create timestamp in
addition to renaming the file (overrides <B>-k</B>). This option is
only used with the 'rename' action.
See Exif DateTime below for additional information.
<DT><B>-T</B>
<DD>
Only set the file timestamp according to the Exif create timestamp, do
not rename the file (overrides <B>-k</B>). This option is only used
with the 'rename' action. Note: On Windows you may have to set the TZ
environment variable for this option to work correctly.
See Exif DateTime below for additional information.
<DT><B>-f,-F</B>
<DD>
These options are used by the commands 'rename' and 'extract' to
determine the file overwrite policy. These options are usually
combined with -v/--verbose to provide additional status output.
<BR>
<P>
The options --force and --Force apply to the 'rename' command.
The 'extract' command treats --force and --Force as permission to
overwrite.
<BR>
<P>
The default behaviour is to prompt the user.
<BR>
-f = Do not prompt before overwriting existing files.
<BR>
-F = Do not prompt before renaming files. Appends '_1'
('_2', ...) to the name of the new file. For example:
<P>
<PRE>
$ curl --silent -O <A HREF="http://clanmills.com/Stonehenge.jpg">http://clanmills.com/Stonehenge.jpg</A>
$ exiv2 --verbose --Force rename Stonehenge.jpg
File 1/1: Stonehenge.jpg
Renaming file to ./20150716_153854.jpg
$ curl --silent -O <A HREF="http://clanmills.com/Stonehenge.jpg">http://clanmills.com/Stonehenge.jpg</A>
$ exiv2 --verbose --Force rename Stonehenge.jpg
File 1/1: Stonehenge.jpg
Renaming file to ./20150716_153854_1.jpg
</PRE>
<P>
The 'rename' command will only overwrite files when the option --force is used. The option --Force is provided to avoid unintentional loss of valuable image files.
<P>
The 'extract' command will overwrite files when either --force or --Force is used. Overwriting extracted files will not cause the loss of image files.
<BR>
<DT><B>-r </B><I>fmt</I>
<DD>
Filename format for the 'rename' action. The format string follows
<B><A HREF="/cgi-bin/man/man2html?3+strftime">strftime</A></B>(3) and supports the following keywords:
<TABLE>
<TR VALIGN=top><TD>:basename:</TD><TD>original filename without extension<BR></TD></TR>
<TR VALIGN=top><TD>:dirname:</TD><TD>name of the directory holding the original file<BR></TD></TR>
<TR VALIGN=top><TD>:parentname:</TD><TD>name of parent directory<BR></TD></TR>
</TABLE>
Default filename format is %Y%m%d_%H%M%S.
<DT><B>-a </B><I>time</I>
<DD>
Time adjustment in the format [-]HH[:MM[:SS]]. This option is only
used with the 'adjust' action. Examples: 1 adds one hour, 1:01
adds one hour and one minute, -0:00:30 subtracts 30 seconds.
See Exif DateTime below for additional information.
<DT><B>-Y </B><I>yrs</I>
<DD>
Time adjustment by a positive or negative number of years, for
the 'adjust' action.
<DT><B>-O </B><I>mon</I>
<DD>
Time adjustment by a positive or negative number of months, for
the 'adjust' action.
<DT><B>-D </B><I>day</I>
<DD>
Time adjustment by a positive or negative number of days, for
the 'adjust' action.
<DT><B>-p </B><I>mode</I>
<DD>
Print mode for the 'print' action. Possible modes are:
<TABLE>
<TR VALIGN=top><TD>s : print a summary of the Exif metadata (the default)</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>a : print Exif, IPTC and XMP metadata (shortcut for -Pkyct)</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>e : print Exif metadata (shortcut for -PEkycv)</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>t : interpreted (translated) Exif tags (-PEkyct)</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>v : plain Exif tag values (-PExgnycv)</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>h : hexdump of the Exif data (-PExgnycsh)</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>i : IPTC datasets (-PIkyct)</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>x : XMP properties (-PXkyct)</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>c : JPEG comment</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>p : list available image previews, sorted by preview image size in pixels</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>C : print image ICC Profile (jpg, png, tiff, webp, cr2, jp2 only)</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>R : print image structure recursively (jpg, png, tiff, webp, cr2, jp2 only)</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>S : print image structure information (jpg, png, tiff, webp, cr2, jp2 only)</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>X : print "raw" XMP (jpg, png, tiff, webp, cr2, jp2 only)</TD><TD><BR></TD></TR>
</TABLE>
<DT><B>-P </B><I>flgs</I>
<DD>
Print flags for fine control of the tag list ('print' action). Allows
control of the type of metadata as well as data columns included in
the print output. Valid flags are:
<TABLE>
<TR VALIGN=top><TD>E : include Exif tags in the list</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>I : IPTC datasets</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>X : XMP properties</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>x : print a column with the tag number</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>g : group name</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>k : key</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>l : tag label</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>n : tag name</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>y : type</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>c : number of components (count)</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>s : size in bytes</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>v : plain data value (vanilla values)</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>V : plain data value AND the word 'set ' (for use with exiv2 -m-)</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>t : interpreted (translated) human readable data</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>h : hexdump of the data</TD><TD><BR></TD></TR>
</TABLE>
<DT><B>-d </B><I>tgt</I>
<DD>
Delete target(s) for the 'delete' action. Possible targets are:
<TABLE>
<TR VALIGN=top><TD>a : all supported metadata (the default)</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>e : Exif section</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>t : Exif thumbnail only</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>i : IPTC data</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>x : XMP packet</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>c : JPEG comment</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>C : ICC Profile</TD><TD><BR></TD></TR>
<TR VALIGN=top><TD>I : All IPTC data</TD><TD><BR></TD></TR>
</TABLE>
<DT><B>-i </B><I>tgt</I>
<DD>
Insert target(s) for the 'insert' action. Possible targets are the
same as those for the <B>-d</B> option, plus an optional modifier:
<P>
X : Insert metadata from an XMP sidecar file <file>.xmp. The remaining
insert targets determine what metadata to insert from the sidecar
file. Possible are Exif, IPTC and XMP and the default is all of
these. Note that the inserted XMP properties include those converted
to Exif and IPTC.
<P>
XX: Insert "raw" XMP metadata from a sidecar (see option -pX)
<P>
- : Read from stdin. This option is intended for "filter" operations such as:
<BR>
$ exiv2 -e{tgt}- <I>filename</I> | xmllint .... | exiv2 -i{tgt}- <I>filename</I>
<P>
Only JPEG thumbnails can be inserted (not TIFF thumbnails), and must be named <I>file</I>-thumb.jpg.
<DT><B>-e </B><I>tgt</I>
<DD>
Extract target(s) for the 'extract' action. Possible targets are the same
as those for the <B>-d</B> option, plus a target to extract preview
images and a modifier to generate an XMP sidecar file:
<BR>
p[<n>[,<m> ...]] : Extract preview images. The optional comma separated
list of preview image numbers is used to determine which preview images
to extract. The available preview images and their numbers are displayed
with the 'print' option <B>-pp</B>.
<P>
C : Extract embedded ICC profile to <file>.icc
<P>
X : Extract metadata to an XMP sidecar file <file>.xmp. The remaining
extract targets determine what metadata to extract to the sidecar
file. Possible are Exif, IPTC and XMP and the default is all of these.
<P>
XX: Extract "raw" XMP metadata to a sidecar (see -pX)
<BR>
You may not use modify commands with the -eXX option and only XMP is written to the sidecar.
<P>
<B>- </B><I>Output to stdout</I> (see -i tgt for an example of this feature)
<P>
<DT><B>-c </B><I>txt</I>
<DD>
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.
<DT><B>-m </B><I>file</I>
<DD>
Command file for the 'modify' action. This option can also be used
with the 'extract' and 'insert' actions to modify metadata on-the-fly.
-m- represents standard-input.
<DT><B>-M </B><I>cmd</I>
<DD>
Command line for the 'modify' action. 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.
<DT><B>-l </B><I>dir</I>
<DD>
Location (directory) for files to be inserted or extracted.
<DT><B>-S </B><I>.suf</I>
<DD>
Use suffix <I>.suf</I> for source files in 'insert' action.
<BR>
</DL>
<A NAME="lbAH"> </A>
<H2>COMMANDS</H2>
Commands for the 'modify' action can be read from a command file, e.g.,
<P>
<PRE>
$ exiv2 -m cmd.txt image.jpg
</PRE>
<P>
or given on the command line, as in
<P>
<PRE>
$ exiv2 -M"add Iptc.Application2.Credit String Mr. Smith" image.jpg
</PRE>
<P>
Note the quotes. Multiple <B>-m</B> and <B>-M</B> options can be combined,
and a non-standard XMP namespace registered.
<P>
<PRE>
$ exiv2 -M"reg myprefix <A HREF="http://ns.myprefix.me/">http://ns.myprefix.me/</A>" -M"add Xmp.myprefix.Whom Mr. Smith" -M"set Exif.Image.Artist Mr. Smith" image.jpg
</PRE>
<P>
When writing Exif, IPTC and XMP metadata,
<B>exiv2</B>
enforces only a correct
metadata structure. It is possible to write tags with types and values
different from those specified in the standards, duplicate Exif tags,
undefined tags, or incomplete metadata. While
<B>exiv2</B>
is able to read
all metadata that it can write, other programs may have difficulties
with images that contain non standard-conforming metadata.
<A NAME="lbAI"> </A>
<H3>Command format</H3>
The format of a command is
<P>
<PRE>
<B>set | add | del</B> <I>key</I> [[<I>type</I>] <I>value</I>]
</PRE>
<DL COMPACT>
<DT><B>set</B>
<DD>
Set the <I>value</I> of an existing tag with a matching <I>key</I> or
add the tag.
<DT><B>add</B>
<DD>
Add a tag (unless <I>key</I> is a non-repeatable IPTC key; nothing
prevents you from adding duplicate Exif tags).
<DT><B>del</B>
<DD>
Delete all occurrences of a tag (requires only a <I>key</I>).
<DT><B>key</B>
<DD>
Exiv2 Exif, IPTC or XMP key.
<DT><B>type</B>
<DD>
Exif keys: Byte | Ascii | Short | Long | Rational | Undefined | SShort | SLong | SRational | Comment
<BR>
IPTC keys: String | Date | Time | Short | Undefined
<BR>
XMP keys: XmpAlt | XmpBag | XmpSeq | LangAlt
<P>
A default <I>type</I> is used if none is explicitly given. The default
is determined based on <I>key</I>.
<DT><B>value</B>
<DD>
The remaining text on the line is the value. It can optionally be
enclosed in single quotes ('<I>value</I>') or double quotes ("<I>value</I>").
<P>
The value is optional. Not providing any value is equivalent to an
empty value ("") and is mainly useful to create an XMP array property,
e.g., a bag.
<P>
The format of Exif <B>Comment</B> values include an optional charset
specification at the beginning. Comments are used by the tags Exif.Photo.UserComment, Exif.GPSInfo.GPSProcessingMethod
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:
<P>
[charset=Ascii|Jis|Unicode|Undefined] <I>comment</I>
<BR>
charset=Undefined is the default
<P>
<PRE>
$ exiv2 -M'set Exif.Photo.UserComment charset=Ascii My photo' x.jpg
$ exiv2 -pa --grep UserComment x.jpg
Exif.Photo.UserComment Undefined 16 My photo
$ exiv2 -pv --grep UserComment x.jpg
0x9286 Photo UserComment Undefined 16 charset=Ascii My photo
$ exiv2 -M'set Exif.Photo.UserComment charset=Unicode \u0052\u006f\u0062\u0069\u006e' x.jpg
$ exiv2 -pa --grep UserComment x.jpg
Exif.Photo.UserComment Undefined 18 Robin
$ exiv2 -pv --grep UserComment x.jpg
0x9286 Photo UserComment Undefined 18 charset=Unicode Robin
$ exiv2 -M'set Exif.GPSInfo.GPSProcessingMethod HYBRID-FIX' x.jpg
$ exiv2 -pa --grep ProcessingMethod x.jpg
Exif.GPSInfo.GPSProcessingMethod Undefined 18 HYBRID-FIX
$ exiv2 -pv --grep ProcessingMethod x.jpg
0x001b GPSInfo GPSProcessingMethod Undefined 18 HYBRID-FIX
</PRE>
<P>
The format for an IPTC <B>Date</B> value is: YYYY-MM-DD (year, month, day)
<P>
The format for an IPTC <B>Time</B> value is: HH:MM:SS (hours, minutes, seconds) and may optionally be followed by: -HH:MM or +HH:MM (hours, minutes ahead/behind UTC)
<P>
The format of <B>Rational</B> (and <B>SRational</B>) is one of: <B>integer | integer/integer | Fnumber | number</B>
<BR>
<B>Rational</B> Examples:
<P>
<PRE>
$ exiv2 "-Mset Exif.Photo.MaxApertureValue 557429/62500" X.jpg
$ exiv2 "-Mset Exif.Photo.MaxApertureValue F5.6" X.jpg
</PRE>
<P>
The <B>Rational</B> format Fnumber is for the convenience of setting aperture values. Aperture values
are stored in Exif is an <B>APEX</B> value which can be evaluated by the expression:
<P>
<PRE>
apex-value = log(Fnumber) * 2.0 / log(2.0)
number = exp(apex-value * log(2.0) / 2.0)
</PRE>
<P>
The <B>Rational</B> format Fnumber is valid for any <B>Rational</B>, even when the key is not an Aperture.
More information about <B>APEX</B> value is available from: <A HREF="http://en.wikipedia.org/wiki/APEX_system">http://en.wikipedia.org/wiki/APEX_system</A>
<P>
The format of XMP <B>LangAlt</B> values includes an optional language qualifier:
<PRE>
<B>lang=</B><I>language-code</I><I> text</I>
</PRE>
<P>
The double quotes around the <I>language-code</I> are optional. If no languge qualifier
is supplied, then the value of "x-default" is used. More information
on the language format can be found at: <A HREF="https://www.ietf.org/rfc/rfc3066.txt">https://www.ietf.org/rfc/rfc3066.txt</A>
<P>
<PRE>
$ exiv2 -M'set Xmp.dc.title lang="de-DE" Euros' X.jpg
$ exiv2 -M'set Xmp.dc.title lang="en-GB" Pounds' X.jpg
$ exiv2 -M'set Xmp.dc.title lang="en-US" In God We Trust' X.jpg
$ exiv2 -M'set Xmp.dc.title lang=fr-FR Euros' X.jpg
$ exiv2 -M'set Xmp.dc.title lang=jp Yen' X.jpg
$ exiv2 -M'set Xmp.dc.title All others pay cash' X.jpg
</PRE>
<P>
To remove a language specification, set the value to '' (empty string)
<PRE>
$ exiv2 -M'set Xmp.dc.title lang="en-US"' X.jpg
</PRE>
To remove all language specifications, delete the key:
<PRE>
$ exiv2 -M'del Xmp.dc.title' X.jpg
</PRE>
To register additional XMP namespaces, combine the command with:
<PRE>
<B>reg</B> <I>prefix</I> <I>namespace</I>
</PRE>
</DL>
<A NAME="lbAJ"> </A>
<H3>Command file format</H3>
Empty lines and lines starting with <B>#</B> in a command file are
ignored (comments). Remaining lines are commands as described above.
<BR>
<A NAME="lbAK"> </A>
<H2>EXIF TAGNAMES AND VALUES</H2>
Exiv2 displays metadata tags and values.
<P>
The tag is a triplet of Family.Group.Tagname. The following groups are defined for the family Exif:
<P>
<PRE>
GPSInfo Canon Fujifilm NikonMe OlympusFe7 SonyMisc2b
Image CanonCf NikonPc OlympusFe9 SonyMisc3c
Image2 CanonCs Nikon1 NikonPreview OlympusFi SonyMinolta
Image3 CanonFi Nikon2 NikonSi01xx OlympusIp SonySInfo1
Iop CanonPa Nikon3 NikonSi02xx OlympusRd
MakerNote CanonPi NikonAFT NikonSiD300a OlympusRd2 Samsung2
MpfInfo CanonPr NikonAf NikonSiD300b OlympusRi SamsungPictureWizard
Photo CanonSi NikonAf2 NikonSiD40 SamsungPreview
SubImage1 CanonTi NikonAf22 NikonSiD80 Sigma
SubImage2 NikonCb1 NikonVr
SubImage3 Casio NikonCb2 NikonWt Sony1
SubImage4 Casio2 NikonCb2a 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 Sony2Fp
PentaxDng NikonLd3 OlympusFe6 SonyMisc1
</PRE>
<P>
Exiv2 supports Exif 2.2 Standard Tags. Exiv2 also supports reading and writing manufacturer's MakerNote. The information in Exif.Photo.MakerNote is encoded as manufacturer's sub-records. For example, CanonCs are Camera Settings, NikonAf are Nikon Auto Focus records, NikonCb are Nikon Color Balance Records. Every tag is defined by a unique tagId (16 bit integer) which is unique within a Group.
<P>
You can query Exiv2 groups and tags with the sample program taglist which is documented in README-SAMPLES.md
<P>
Exif Metadata values are defined in the Exif Standard. All data is an array of data elements. The Count defines the number elements in the array. All elements in an array have the same type.
<P>
<PRE>
Type Explanation
1 BYTE An 8-bit unsigned integer.
2 ASCII 7-bit ASCII. NUL terminated.
3 SHORT A 16-bit (2-byte) unsigned integer.
4 LONG A 32-bit (4-byte) unsigned integer
5 RATIONAL Two LONGs. Numerator, denominator.
7 UNDEFINED An 8-bit byte.
8 SSHORT A 16-bit (2-byte) signed integer.
9 SLONG A 32-bit (4-byte) signed integer.
10 SRATIONAL Two SLONGs. Numerator, denominator.
</PRE>
<P>
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.
<A NAME="lbAL"> </A>
<H2>Exif DateTime</H2>
An Exif DateTime string is stored as 20 ascii bytes (including trailing nul) in the format:
<P>
YYYY:MM:DD HH:MM:SS
<P>
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.
<P>
<A NAME="lbAM"> </A>
<H2>CONFIGURATION FILE</H2>
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:
<BR>
<P>
<PRE>
$ exiv2 --verbose --version --grep config_path
exiv2 0.27.0.1
config_path=/Users/rmills/.exiv2
</PRE>
<P>
The purpose of the configuration file is to define your own lenses for recognition by Exiv2. The configuration file is in Windows .ini format and has sections for each of the major camera manufactures canon,nikon,pentax,minolta,olympus and sony. The lens metadata is stored as a integer called the lensID. You can change the lens name associated with any lensID.
<BR>
<P>
<PRE>
$ cat ~/.exiv2
[nikon]
146=Robin's Sigma Lens <--- The name of your lens
</PRE>
<P>
You obtain the lensID for your camera with the command:
<PRE>
$ exiv2 -pv --grep lens/i <A HREF="http://clanmills.com/Stonehenge.jpg">http://clanmills.com/Stonehenge.jpg</A>
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 <--- This number
0x000d NikonLd3 LensFStops Byte 1 55
</PRE>
<A NAME="lbAN"> </A>
<H2>EXAMPLES</H2>
<PRE>
$ exiv2 *.jpg
</PRE>
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.
<P>
If you use --grep pattern, the default becomes -pa. See -g/grep above.
<P>
<PRE>
$ exiv2 -g Date <A HREF="http://clanmills.com/Stonehenge.jpg">http://clanmills.com/Stonehenge.jpg</A>
</PRE>
<PRE>
$ exiv2 -pi image.jpg
</PRE>
Prints the IPTC metadata of the image.
<P>
<PRE>
$ exiv2 rename img_1234.jpg
</PRE>
Renames img_1234.jpg (taken on 13-Nov-05 at 22:58:31) to 20051113_225831.jpg
<P>
<PRE>
$ exiv2 -r':basename:_%Y%m' rename img_1234.jpg
</PRE>
Renames img_1234.jpg to img_1234_200511.jpg
<P>
<PRE>
$ exiv2 -et img1.jpg img2.jpg
</PRE>
Extracts the Exif thumbnails from the two files into img1-thumb.jpg
and img2-thumb.jpg.
<P>
<PRE>
$ exiv2 -it img1.jpg img2.jpg
</PRE>
Inserts (copies) metadata from img1.exv to img1.jpg and from img2.exv
to img2.jpg.
<P>
<PRE>
$ exiv2 -ep1,2 image.jpg
</PRE>
Extracts previews 1 and 2 from the image to the files image-preview1.jpg
and image-preview2.jpg.
<P>
<PRE>
$ exiv2 -eiX image.jpg
</PRE>
Extracts IPTC datasets into an XMP sidecar file image.xmp and in the
process converts them to "IPTC Core" XMP schema.
<P>
<PRE>
$ exiv2 -iixX image.jpg
</PRE>
Inserts IPTC and XMP metadata from an XMP sidecar file image.xmp into