1
# Sample Exiv2 command file for XMP tags
2
# --------------------------------------
4
# Set basic properties. Exiv2 uses the value type of the XMP specification
5
# for the property, if it is not specified. The default XMP value type
6
# for unknown properties is a simple text value.
8
# A simple text property.
9
set Xmp.dc.source xmpsample.cpp
11
# An array item (unordered array).
12
set Xmp.dc.subject "Palmtree"
14
# Add a 2nd array item
15
set Xmp.dc.subject "Rubbertree"
17
# A language alternative (without a default)
18
set Xmp.dc.title lang=en-US Sunset on the beach
19
set Xmp.dc.title lang=de-DE Sonnenuntergang am Strand
21
# Any properties can be set provided the namespace is known.
28
set Xmp.dc.seven Seven
30
# The value type can be specified. Exiv2 has support for a limited number
31
# of specific XMP types with built-in types: The basic XmpText, array
32
# types XmpAlt (alternative array), XmpBag (unordered array), XmpSeq
33
# (ordered array) and language alternatives LangAlt.
35
# Simple text property with explicitly specified value type
36
set Xmp.dc.format XmpText "image/jpeg"
39
set Xmp.dc.creator XmpSeq "1) The first creator"
40
set Xmp.dc.creator "2) The second creator"
41
set Xmp.dc.creator "3) And another one"
43
# A language alternative. The default entry of a langauge alternative
44
# doesn't need a language qualifier.
45
set Xmp.dc.description LangAlt lang=de-DE Hallo, Welt
46
set Xmp.dc.description LangAlt Hello, World
48
# According to the XMP specification, Xmp.tiff.ImageDescription is an
49
# alias for Xmp.dc.description. Exiv2 treats an alias just like any
51
set Xmp.tiff.ImageDescription TIFF image description
52
set Xmp.tiff.ImageDescription lang=de-DE TIFF Bildbeschreibung
54
# Register a namespace which Exiv2 doesn't know yet with a prefix.
57
# Add a property in the new custom namespace.
58
set Xmp.ns.myProperty myValue
60
# There are no built-in Exiv2 value types for structures, qualifiers and
61
# nested types. However, these can be added by using an XmpText value and a
65
set Xmp.xmpDM.videoFrameSize/stDim:w 16
66
set Xmp.xmpDM.videoFrameSize/stDim:h 9
67
set Xmp.xmpDM.videoFrameSize/stDim:unit inch
69
# Add an element with a qualifier (using the namespace registered earlier)
70
set Xmp.dc.publisher James Bond
71
set Xmp.dc.publisher[1]/?ns:role secret agent
73
# Add a qualifer to an array element of Xmp.dc.creator (added above)
74
set Xmp.dc.creator[2]/?ns:role programmer
76
# Add an array of structures. First set a text property with just the
77
# array type. (Note: this is not the same as creating an XmpBag property.)
78
set Xmp.xmpBJ.JobRef XmpText type=Bag
80
# Then set the array items. Each of them is a structure with two elements.
81
set Xmp.xmpBJ.JobRef[1]/stJob:name XmpText Birthday party
82
set Xmp.xmpBJ.JobRef[1]/stJob:role XmpText Photographer
84
set Xmp.xmpBJ.JobRef[2]/stJob:name Wedding ceremony
85
set Xmp.xmpBJ.JobRef[2]/stJob:role Best man