-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample.html
538 lines (481 loc) · 26.3 KB
/
sample.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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!--*- sgml -*-->
<html lang="en">
<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><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>Command line utility examples</h1>
</div>
<div class="row">
<div class="col-md-6">
<p>By default, the utility prints a summary of the Exif information</p>
<pre>
<span class="stringliteral">$ exiv2 img_1771.jpg</span>
File name : img_1771.jpg
File size : 32764 Bytes
MIME type : image/jpeg
Image size : 480 x 360
Thumbnail : image/jpeg, 5448 Bytes
Camera make : Canon
Camera model : Canon PowerShot S40
Image timestamp : 2003:12:14 12:01:44
File number : 117-1771
Exposure time : 1/500 s
Aperture : F4.9
Exposure bias : 0 EV
Flash : No, auto
Flash bias : 0 EV
Focal length : 21.3 mm
Subject distance: 7.82 m
ISO speed : 100
Exposure mode : Program (P)
Metering mode : Center weighted average
Macro mode : Off
Image quality : Superfine
White balance : Auto
Copyright :
Exif comment :
</pre>
</div><!-- /.col-md-6 -->
<div class="col-md-6">
<p> </p>
<img src="include/img_1771.jpg" class="img-responsive img-rounded center-block" title="img_1771.jpg (32764 Bytes)" alt="Image with the Exif data shown in the sample output">
<p class="text-center text-muted"><em>Image with the Exif data shown in the sample output</em></p>
</div><!-- /.col-md-6 -->
</div><!-- /.row -->
<p> </p>
<p>With the <code>-pt</code> option, the utility prints out all Exif information as interpreted (translated) values. Alternatively, <code>-pv</code> prints the plain Exif data values.</p>
<pre>
<span class="stringliteral">$ exiv2 -pt img_1771.jpg</span>
Exif.Image.Make Ascii 6 Canon
Exif.Image.Model Ascii 20 Canon PowerShot S40
Exif.Image.Orientation Short 1 top, left
Exif.Image.XResolution Rational 1 180
Exif.Image.YResolution Rational 1 180
Exif.Image.ResolutionUnit Short 1 inch
Exif.Image.DateTime Ascii 20 2003:12:14 12:01:44
Exif.Image.YCbCrPositioning Short 1 Centered
Exif.Image.ExifTag Long 1 196
Exif.Photo.ExposureTime Rational 1 1/500 s
Exif.Photo.FNumber Rational 1 F4.9
Exif.Photo.ExifVersion Undefined 4 2.20
Exif.Photo.DateTimeOriginal Ascii 20 2003:12:14 12:01:44
Exif.Photo.DateTimeDigitized Ascii 20 2003:12:14 12:01:44
Exif.Photo.ComponentsConfiguration Undefined 4 YCbCr
Exif.Photo.CompressedBitsPerPixel Rational 1 5
Exif.Photo.ShutterSpeedValue SRational 1 1/501 s
Exif.Photo.ApertureValue Rational 1 F5
Exif.Photo.ExposureBiasValue SRational 1 0 EV
Exif.Photo.MaxApertureValue Rational 1 F2.8
Exif.Photo.MeteringMode Short 1 Center weighted average
Exif.Photo.Flash Short 1 No, auto
Exif.Photo.FocalLength Rational 1 21.3 mm
Exif.Photo.MakerNote Undefined 450 12 0 1 0 3 0 40 0 0 0 68 4 0 0 2 0 3 0 4 0 0 0 148 4 0 0 3 0 3 0 4 0 0 0 156 4 0 0 4 0 3 0 27 0 0 0 164 4 0 0 0 0 3 0 6 0 0 0 218 4 0 0 0 0 3 0 4 0 0 0 230 4 0 0 6 0 2 0 32 0 0 0 238 4 0 0 7 0 2 0 24 0 0 0 14 5 0 0 8 0 4 0 1 0 0 0 59 225 17 0 9 0 2 0 32 0 0 0 38 5 0 0 16 0 4 0 1 0 0 0 0 0 17 1 13 0 3 0 21 0 0 0 70 5 0 0 0 0 0 0 80 0 2 0 0 0 5 0 1 0 0 0 0 0 4 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 17 0 5 0 1 0 3 48 1 0 255 255 255 255 170 2 227 0 32 0 149 0 192 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 49 0 224 8 224 8 0 0 1 0 2 0 170 2 30 1 215 0 0 0 0 0 0 0 0 0 54 0 0 0 160 0 20 1 149 0 31 1 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 2 48 0 0 0 0 0 0 1 0 14 3 0 0 149 0 33 1 0 0 0 0 0 0 250 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 73 77 71 58 80 111 119 101 114 83 104 111 116 32 83 52 48 32 74 80 69 71 0 0 0 0 0 0 0 0 0 0 70 105 114 109 119 97 114 101 32 86 101 114 115 105 111 110 32 49 46 49 48 0 0 0 65 110 100 114 101 97 115 32 72 117 103 103 101 108 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 42 0 3 0 1 128 122 1 1 128 0 0 0 0 0 0 3 1 2 0 0 0 10 0 0 0 0 0 0 0 57 0 198 0 5 0 0 0 0 0 0 0
Exif.MakerNote.Offset Long 1 942
Exif.MakerNote.ByteOrder Ascii 3 II
Exif.CanonCs.Macro Short 1 Off
Exif.CanonCs.Selftimer Short 1 Off
Exif.CanonCs.Quality Short 1 Superfine
Exif.CanonCs.FlashMode Short 1 Auto
Exif.CanonCs.DriveMode Short 1 Single / timer
Exif.CanonCs.FocusMode Short 1 Single
Exif.CanonCs.RecordMode Short 1 JPEG
Exif.CanonCs.ImageSize Short 1 Large
Exif.CanonCs.EasyMode Short 1 Manual
Exif.CanonCs.DigitalZoom Short 1 None
Exif.CanonCs.Contrast Short 1 Normal
Exif.CanonCs.Saturation Short 1 Normal
Exif.CanonCs.Sharpness Short 1 Normal
Exif.CanonCs.ISOSpeed Short 1 100
Exif.CanonCs.MeteringMode Short 1 Center-weighted average
Exif.CanonCs.FocusType Short 1 Auto
Exif.CanonCs.AFPoint Short 1 Center
Exif.CanonCs.ExposureProgram Short 1 Program (P)
Exif.CanonCs.LensType Short 1 n/a
Exif.CanonCs.Lens Short 3 7.1 - 21.3 mm
Exif.CanonCs.MaxAperture Short 1 F5
Exif.CanonCs.MinAperture Short 1 F8
Exif.CanonCs.FlashActivity Short 1 Did not fire
Exif.CanonCs.FlashDetails Short 1
Exif.CanonCs.FocusContinuous Short 1 Single
Exif.CanonCs.AESetting Short 1 Normal AE
Exif.CanonCs.ImageStabilization Short 1 (65535)
Exif.CanonCs.DisplayAperture Short 1 49
Exif.CanonCs.ZoomSourceWidth Short 1 2272
Exif.CanonCs.ZoomTargetWidth Short 1 2272
Exif.CanonCs.SpotMeteringMode Short 1 AF Point
Exif.Canon.FocalLength Short 4 21.3 mm
Exif.CanonSi.AutoISO Short 1 100
Exif.CanonSi.ISOSpeed Short 1 100
Exif.CanonSi.MeasuredEV Short 1 13.63
Exif.CanonSi.TargetAperture Short 1 F5
Exif.CanonSi.TargetShutterSpeed Short 1 1/501 s
Exif.CanonSi.WhiteBalance Short 1 Auto
Exif.CanonSi.SlowShutter Short 1 Off
Exif.CanonSi.Sequence Short 1 0
Exif.CanonSi.CameraTemperature Short 1 --
Exif.CanonSi.FlashGuideNumber Short 1 0
Exif.CanonSi.AFPointUsed Short 1 3 focus points; center used
Exif.CanonSi.FlashBias Short 1 0 EV
Exif.CanonSi.AutoExposureBracketing Short 1 Off
Exif.CanonSi.SubjectDistance Short 1 7.82 m
Exif.CanonSi.ApertureValue Short 1 F5
Exif.CanonSi.ShutterSpeedValue Short 1 1/523 s
Exif.CanonSi.MeasuredEV2 Short 1 -6.00
Exif.CanonSi.BulbDuration Short 1 0
Exif.CanonSi.CameraType Short 1 Compact
Exif.Canon.ImageType Ascii 32 IMG:PowerShot S40 JPEG
Exif.Canon.FirmwareVersion Ascii 24 Firmware Version 1.10
Exif.Canon.FileNumber Long 1 117-1771
Exif.Canon.OwnerName Ascii 32 Andreas Huggel
Exif.Canon.ModelID Long 1 PowerShot S40
Exif.Canon.CameraInfo Short 21 42 3 32769 378 32769 0 0 0 259 2 0 10 0 0 0 57 198 5 0 0 0
Exif.Photo.UserComment Undefined 264
Exif.Photo.FlashpixVersion Undefined 4 1.00
Exif.Photo.ColorSpace Short 1 sRGB
Exif.Photo.PixelXDimension Short 1 2272
Exif.Photo.PixelYDimension Short 1 1704
Exif.Photo.InteroperabilityTag Long 1 1416
Exif.Iop.InteroperabilityIndex Ascii 4 R98
Exif.Iop.InteroperabilityVersion Undefined 4 1.00
Exif.Iop.RelatedImageWidth Short 1 2272
Exif.Iop.RelatedImageLength Short 1 1704
Exif.Photo.FocalPlaneXResolution Rational 1 8114.29
Exif.Photo.FocalPlaneYResolution Rational 1 8114.29
Exif.Photo.FocalPlaneResolutionUnit Short 1 inch
Exif.Photo.SensingMethod Short 1 One-chip color area
Exif.Photo.FileSource Undefined 1 Digital still camera
Exif.Photo.CustomRendered Short 1 Normal process
Exif.Photo.ExposureMode Short 1 Auto
Exif.Photo.WhiteBalance Short 1 Auto
Exif.Photo.DigitalZoomRatio Rational 1 1.0
Exif.Photo.SceneCaptureType Short 1 Standard
Exif.Thumbnail.Compression Short 1 JPEG (old-style)
Exif.Thumbnail.XResolution Rational 1 180
Exif.Thumbnail.YResolution Rational 1 180
Exif.Thumbnail.ResolutionUnit Short 1 inch
Exif.Thumbnail.JPEGInterchangeFormat Long 1 2036
Exif.Thumbnail.JPEGInterchangeFormatLength Long 1 5448
</pre>
<p> </p>
<p>Short description of the actions and options supported by the Exiv2 utility
(see the <a href="manpage.html" title="Exiv2 man page">man page</a> for details)</p>
<a name="usage"></a><pre>
<span class="stringliteral">$ exiv2 -h</span>
Usage: exiv2 [ options ] [ action ] file ...
Manipulate the Exif metadata of images.
Actions:
ad | adjust Adjust Exif timestamps by the given time. This action
requires at least one of the -a, -Y, -O or -D options.
pr | print Print image metadata.
rm | delete Delete image metadata from the files.
in | insert Insert metadata from corresponding *.exv files.
Use option -S to change the suffix of the input files.
ex | extract Extract metadata to *.exv, *.xmp and thumbnail image files.
mv | rename Rename files and/or set file timestamps according to the
Exif create timestamp. The filename format can be set with
-r format, timestamp options are controlled with -t and -T.
mo | modify Apply commands to modify (add, set, delete) the Exif and
IPTC metadata of image files or set the JPEG comment.
Requires option -c, -m or -M.
fi | fixiso Copy ISO setting from the Nikon Makernote to the regular
Exif tag.
fc | fixcom Convert the UNICODE Exif user comment to UCS-2. Its current
character encoding can be specified with the -n option.
Options:
-h Display this help and exit.
-V Show the program version and exit.
-v Be verbose during the program run.
-q Silence warnings and error messages during the program run (quiet).
-Q lvl Set log-level to d(ebug), i(nfo), w(arning), e(rror) or m(ute).
-b Show large binary values.
-u Show unknown tags.
-g key Only output info for this key (grep).
-K key Only output info for this key (exact match).
-n enc Charset to use to decode UNICODE Exif user comments.
-k Preserve file timestamps (keep).
-t Also set the file timestamp in 'rename' action (overrides -k).
-T Only set the file timestamp in 'rename' action, do not rename
the file (overrides -k).
-f Do not prompt before overwriting existing files (force).
-F Do not prompt before renaming files (Force).
-a time Time adjustment in the format [-]HH[:MM[:SS]]. This option
is only used with the 'adjust' action.
-Y yrs Year adjustment with the 'adjust' action.
-O mon Month adjustment with the 'adjust' action.
-D day Day adjustment with the 'adjust' action.
-p mode Print mode for the 'print' action. Possible modes are:
s : print a summary of the Exif metadata (the default)
a : print Exif, IPTC and XMP metadata (shortcut for -Pkyct)
e : print Exif metadata (shortcut for -PEkycv)
t : interpreted (translated) Exif data (-PEkyct)
v : plain Exif data values (-PExgnycv)
h : hexdump of the Exif data (-PExgnycsh)
i : IPTC data values (-PIkyct)
x : XMP properties (-PXkyct)
c : JPEG comment
p : list available previews
C : print ICC profile embedded in image
R : recursive print structure of image
S : print structure of image
X : extract XMP from image
-P flgs Print flags for fine control of tag lists ('print' action):
E : include Exif tags in the list
I : IPTC datasets
X : XMP properties
x : print a column with the tag number
g : group name
k : key
l : tag label
n : tag name
y : type
c : number of components (count)
s : size in bytes
v : plain data value
t : interpreted (translated) data
h : hexdump of the data
-d tgt Delete target(s) for the 'delete' action. Possible targets are:
a : all supported metadata (the default)
e : Exif section
t : Exif thumbnail only
i : IPTC data
x : XMP packet
c : JPEG comment
-i tgt Insert target(s) for the 'insert' action. Possible targets are
the same as those for the -d option, plus a modifier:
X : Insert metadata from an XMP sidecar file <file>.xmp
Only JPEG thumbnails can be inserted, they need to be named
<file>-thumb.jpg
-e tgt Extract target(s) for the 'extract' action. Possible targets
are the same as those for the -d option, plus a target to extract
preview images and a modifier to generate an XMP sidecar file:
p[<n>[,<m> ...]] : Extract preview images.
X : Extract metadata to an XMP sidecar file <file>.xmp
-r fmt Filename format for the 'rename' action. The format string
follows strftime(3). The following keywords are supported:
:basename: - original filename without extension
:dirname: - name of the directory holding the original file
:parentname: - name of parent directory
Default filename format is %Y%m%d_%H%M%S.
-c txt JPEG comment string to set in the image.
-m file Command file for the modify action. The format for commands is
set|add|del <key> [[<type>] <value>].
-M cmd Command line for the modify action. The format for the
commands is the same as that of the lines of a command file.
-l dir Location (directory) for files to be inserted from or extracted to.
-S .suf Use suffix .suf for source files for insert command.
</pre>
<p> </p>
<p id="modify">You can modify any Exif or IPTC metadata using modify-commands from a file (<code>-m</code> option) or directly from the command line (<code>-M</code> option). Multiple <code>-M</code> and <code>-m</code> directives can be combined. Here is a sample command file for the modify option (lines starting with <code>#</code> are comments)</p>
<pre>
<span class="comment"># Sample Exiv2 command file</span>
# -------------------------
#
# $ exiv2 -m cmd.txt file ...
#
# to apply the commands in cmd.txt to each file. Alternatively, commands can be
# run from the command line directly, without a command file:
#
# $ exiv2 -M"add Iptc.Application2.Credit String mee too!" file ...
#
# Note the quotes. Multiple -m and -M options are allowed and can be combined.
#
# Command file format
# -------------------
# Empty lines and lines starting with # are ignored
# Each remaining line is a command. The format for command lines is
# <cmd> <key> [[<type>] <value>]
# cmd = set|add|del
# set will set the value of an existing tag of the given key or add a tag
# add will add a tag (unless the key is a non-repeatable IPTC key)
# del will delete a tag
# key = Exiv2 Exif or IPTC key
# type =
# Byte|Ascii|Short|Long|Rational|Undefined|SShort|SLong|SRational|Comment
# for Exif keys, and
# String|Date|Time|Short|Undefined for IPTC keys
# The format for IPTC Date values is YYYY-MM-DD (year, month, day) and
# for IPTC Time values it is HH:MM:SS±HH:MM where HH:MM:SS refers to local
# hour, minute and seconds and ±HH:MM refers to hours and minutes ahead or
# behind Universal Coordinated Time.
# A default type is used if none is explicitly given. The default type
# is determined based on the key.
# value
# The remaining text on the line is the value. It can optionally be enclosed in
# double quotes ("value")
#
add Iptc.Application2.Credit String "mee too! (1)"
add Iptc.Application2.Credit mee too! (2)
del Iptc.Application2.Headline
set Iptc.Application2.Headline Filename
add Exif.Image.WhitePoint Short 32 12 4 5 6
set Exif.Image.DateTime Ascii "Zwanzig nach fuenf"
set Exif.Image.Artist Ascii nobody
set Exif.Image.Artist "Vincent van Gogh"
set Exif.Photo.UserComment Comment charset=Ascii This is an ASCII Exif comment
</pre>
<p> </p>
<p id="xmp">The following commands are for XMP tags,
the <a href="example5.html#output">result</a>
is the same as that of Example 5.</p>
<pre>
<span class="comment"># Sample Exiv2 command file for XMP tags</span>
# --------------------------------------
# Set basic properties. Exiv2 uses the value type of the XMP specification
# for the property, if it is not specified. The default XMP value type
# for unknown properties is a simple text value.
# A simple text property.
set Xmp.dc.source xmpsample.cpp
# An array item (unordered array).
set Xmp.dc.subject "Palmtree"
# Add a 2nd array item
set Xmp.dc.subject "Rubbertree"
# A language alternative (without a default)
set Xmp.dc.title lang=en-US Sunset on the beach
set Xmp.dc.title lang=de-DE Sonnenuntergang am Strand
# Any properties can be set provided the namespace is known.
set Xmp.dc.one -1
set Xmp.dc.two 3.1415
set Xmp.dc.three 5/7
set Xmp.dc.four 255
set Xmp.dc.five 256
set Xmp.dc.six false
set Xmp.dc.seven Seven
# The value type can be specified. Exiv2 has support for a limited number
# of specific XMP types with built-in types: The basic XmpText, array
# types XmpAlt (alternative array), XmpBag (unordered array), XmpSeq
# (ordered array) and language alternatives LangAlt.
# Simple text property with explicitly specified value type
set Xmp.dc.format XmpText "image/jpeg"
# An ordered array
set Xmp.dc.creator XmpSeq "1) The first creator"
set Xmp.dc.creator "2) The second creator"
set Xmp.dc.creator "3) And another one"
# A language alternative. The default entry of a langauge alternative
# doesn't need a language qualifier.
set Xmp.dc.description LangAlt lang=de-DE Hallo, Welt
set Xmp.dc.description LangAlt Hello, World
# According to the XMP specification, Xmp.tiff.ImageDescription is an
# alias for Xmp.dc.description. Exiv2 treats an alias just like any
# other property.
set Xmp.tiff.ImageDescription TIFF image description
set Xmp.tiff.ImageDescription lang=de-DE TIFF Bildbeschreibung
# Register a namespace which Exiv2 doesn't know yet with a prefix.
reg ns myNamespace/
# There are no built-in Exiv2 value types for structures, qualifiers and
# nested types. However, these can be added by using an XmpText value and a
# path as the key.
# Add a structure
set Xmp.xmpDM.videoFrameSize/stDim:w 16
set Xmp.xmpDM.videoFrameSize/stDim:h 9
set Xmp.xmpDM.videoFrameSize/stDim:unit inch
# Add an element with a qualifier (using the namespace registered earlier)
set Xmp.dc.publisher James Bond
set Xmp.dc.publisher/?ns:role secret agent
# Add a qualifier to an array element of Xmp.dc.creator (added above)
set Xmp.dc.creator[2]/?ns:role programmer
# Add an array of structures. First set a text property with just the
# array type. (Note: this is not the same as creating an XmpBag property.)
set Xmp.xmpBJ.JobRef XmpText type=Bag
# Then set the array items. Each of them is a structure with two elements.
set Xmp.xmpBJ.JobRef[1]/stJob:name XmpText Birthday party
set Xmp.xmpBJ.JobRef[1]/stJob:role XmpText Photographer
set Xmp.xmpBJ.JobRef[2]/stJob:name Wedding ceremony
set Xmp.xmpBJ.JobRef[2]/stJob:role Best man
</pre>
</div><!-- /.container -->
<div id="footer">
<footer>
<div class="container">
<div class="row">
<div class="page-footer">
<div class="col-sm-5">
Exiv2 v0.27.5.3
</div><!-- /.col-sm-5 -->
<div class="col-sm-2"></div><!-- /.col-sm-2 -->
<div class="col-sm-5">
<span class="visible-xs-block text-center"><p>Last modified 2022-02-18 16:45 UTC</p></span>
<span class="hidden-xs pull-right"><p>Last modified 2022-02-18 16:45 UTC</p></span>
</div><!-- /.col-sm-5 -->
</div>
</div><!-- /.row -->
</div><!-- /.container -->
</footer>
</div><!-- closes footer -->
<!-- Bootstrap core JavaScript
================================================== -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="dist/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="dist/assets/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>