~ubuntu-branches/debian/lenny/exiv2/lenny

« back to all changes in this revision

Viewing changes to doc/cmdxmp.txt

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2008-06-21 08:23:53 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080621082353-b1n4w08trwfwbfl4
Tags: 0.17.1-1
* New upstream release
  - Library transition cleared on debian-release/ d-d-a
* Version 0.17 also fixes:
  - CVE-2008-2696: DoS via metadata in images (Closes: #486328)
  - crashes when fed with wrong file (Closes: #485670)
* Urgency medium for CVE fix
* debian/patches/gcc4.3.diff unecessary for gcc-4.3
* Add /usr/share/bug/exiv2/presubj message for reportbug(1)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Sample Exiv2 command file for XMP tags
 
2
# --------------------------------------
 
3
 
 
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.
 
7
 
 
8
# A simple text property.
 
9
set Xmp.dc.source      xmpsample.cpp
 
10
 
 
11
# An array item (unordered array).
 
12
set Xmp.dc.subject     "Palmtree"
 
13
 
 
14
# Add a 2nd array item
 
15
set Xmp.dc.subject     "Rubbertree"
 
16
 
 
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
 
20
 
 
21
# Any properties can be set provided the namespace is known.
 
22
set Xmp.dc.one         -1
 
23
set Xmp.dc.two         3.1415
 
24
set Xmp.dc.three       5/7
 
25
set Xmp.dc.four        255
 
26
set Xmp.dc.five        256
 
27
set Xmp.dc.six         false
 
28
set Xmp.dc.seven       Seven
 
29
 
 
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.
 
34
 
 
35
# Simple text property with explicitly specified value type
 
36
set Xmp.dc.format XmpText "image/jpeg"
 
37
 
 
38
# An ordered array
 
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"
 
42
 
 
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
 
47
 
 
48
# According to the XMP specification, Xmp.tiff.ImageDescription is an
 
49
# alias for Xmp.dc.description. Exiv2 treats an alias just like any
 
50
# other property.
 
51
set Xmp.tiff.ImageDescription TIFF image description
 
52
set Xmp.tiff.ImageDescription lang=de-DE TIFF Bildbeschreibung
 
53
 
 
54
# Register a namespace which Exiv2 doesn't know yet with a prefix.
 
55
reg ns myNamespace/
 
56
 
 
57
# Add a property in the new custom namespace.
 
58
set Xmp.ns.myProperty myValue
 
59
 
 
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
 
62
# path as the key.
 
63
 
 
64
# Add a structure
 
65
set Xmp.xmpDM.videoFrameSize/stDim:w    16
 
66
set Xmp.xmpDM.videoFrameSize/stDim:h    9
 
67
set Xmp.xmpDM.videoFrameSize/stDim:unit inch
 
68
 
 
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
 
72
 
 
73
# Add a qualifer to an array element of Xmp.dc.creator (added above)
 
74
set Xmp.dc.creator[2]/?ns:role programmer
 
75
 
 
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
 
79
 
 
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
 
83
 
 
84
set Xmp.xmpBJ.JobRef[2]/stJob:name             Wedding ceremony
 
85
set Xmp.xmpBJ.JobRef[2]/stJob:role             Best man