[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:38:48 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=a464bca
The following commit has been merged in the master branch:
commit a464bca8295238745509988170f93c9a368d7b10
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Sat Sep 29 18:04:53 2007 +0000
Tweaks.
---
src/xmpsample.cpp | 14 ++++++++------
test/data/xmpparser-test.out | 32 +++++++++++++++++---------------
2 files changed, 25 insertions(+), 21 deletions(-)
diff --git a/src/xmpsample.cpp b/src/xmpsample.cpp
index 9a4c520..dbd65a9 100644
--- a/src/xmpsample.cpp
+++ b/src/xmpsample.cpp
@@ -15,6 +15,14 @@ try {
Exiv2::XmpData xmpData;
// -------------------------------------------------------------------------
+ // Teaser: The quickest way to add simple XMP properties using Exiv2
+
+ xmpData["Xmp.dc.source"] = "xmpsample.cpp"; // a simple text value
+ xmpData["Xmp.dc.subject"] = "Palmtree"; // an array item
+ xmpData["Xmp.dc.subject"] = "Rubbertree"; // add a 2nd array item
+ xmpData["Xmp.dc.title"] = "lang=en-US Beach"; // a language alternative
+
+ // -------------------------------------------------------------------------
// Exiv2 has specialized values for simple XMP properties, arrays of simple
// properties and language alternatives.
@@ -36,12 +44,6 @@ try {
v->read("Hello, World"); // qualifier
xmpData.add(Exiv2::XmpKey("Xmp.dc.description"), v.get());
- // Or all of the above but using associative array style syntax
- xmpData["Xmp.dc.format"] = "image/tiff"; // overwrites existing value
- xmpData["Xmp.dc.subject"] = "Palmtree"; // adds a new array value
- xmpData["Xmp.dc.subject"] = "Rubbertree"; // adds a second array item
- xmpData["Xmp.dc.title"] = "lang=en-US Beach"; // a language alternative
-
// -------------------------------------------------------------------------
// Register a namespace which Exiv2 doesn't know yet. This is only needed
// when properties are added manually. If the XMP metadata is read from an
diff --git a/test/data/xmpparser-test.out b/test/data/xmpparser-test.out
index 3c0a77f..8b2629c 100644
--- a/test/data/xmpparser-test.out
+++ b/test/data/xmpparser-test.out
@@ -279,11 +279,12 @@ Xmp.ns1.NestedStructProp/ns2:Outer/ns2:Middle/ns2:Inner/ns2:Field2 XmpText 12
>
> <?xpacket end="w"?>
\ No newline at end of file
-Xmp.dc.format XmpText 10 image/tiff
-Xmp.dc.creator XmpSeq 3 1) The first creator, 2) The second creator, 3) And another one
-Xmp.dc.description LangAlt 2 lang="de-DE" Hallo, Welt, lang="x-default" Hello, World
+Xmp.dc.source XmpText 13 xmpsample.cpp
Xmp.dc.subject XmpBag 2 Palmtree, Rubbertree
Xmp.dc.title LangAlt 1 lang="en-US" Beach
+Xmp.dc.format XmpText 10 image/jpeg
+Xmp.dc.creator XmpSeq 3 1) The first creator, 2) The second creator, 3) And another one
+Xmp.dc.description LangAlt 2 lang="de-DE" Hallo, Welt, lang="x-default" Hello, World
Xmp.xmpDM.videoFrameSize/stDim:w XmpText 2 16
Xmp.xmpDM.videoFrameSize/stDim:h XmpText 1 9
Xmp.xmpDM.videoFrameSize/stDim:unit XmpText 4 inch
@@ -305,7 +306,19 @@ Xmp.xmpBJ.JobRef[2]/stJob:role XmpText 8 Best man
xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#"
xmlns:xapBJ="http://ns.adobe.com/xap/1.0/bj/"
xmlns:stJob="http://ns.adobe.com/xap/1.0/sType/Job#"
- dc:format="image/tiff">
+ dc:source="xmpsample.cpp"
+ dc:format="image/jpeg">
+ <dc:subject>
+ <rdf:Bag>
+ <rdf:li>Palmtree</rdf:li>
+ <rdf:li>Rubbertree</rdf:li>
+ </rdf:Bag>
+ </dc:subject>
+ <dc:title>
+ <rdf:Alt>
+ <rdf:li xml:lang="en-US">Beach</rdf:li>
+ </rdf:Alt>
+ </dc:title>
<dc:creator>
<rdf:Seq>
<rdf:li>1) The first creator</rdf:li>
@@ -322,17 +335,6 @@ Xmp.xmpBJ.JobRef[2]/stJob:role XmpText 8 Best man
<rdf:li xml:lang="de-DE">Hallo, Welt</rdf:li>
</rdf:Alt>
</dc:description>
- <dc:subject>
- <rdf:Bag>
- <rdf:li>Palmtree</rdf:li>
- <rdf:li>Rubbertree</rdf:li>
- </rdf:Bag>
- </dc:subject>
- <dc:title>
- <rdf:Alt>
- <rdf:li xml:lang="en-US">Beach</rdf:li>
- </rdf:Alt>
- </dc:title>
<dc:publisher rdf:parseType="Resource">
<rdf:value>James Bond</rdf:value>
<ns:role>secret agent</ns:role>
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list