[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:53 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=a4fe28c
The following commit has been merged in the master branch:
commit a4fe28cef743f52c91b1a14a5b5f3e15ba883fd1
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Sat Oct 6 08:11:52 2007 +0000
Disabled XMP SDK standard aliases.
---
src/error.cpp | 1 +
src/xmp.cpp | 4 ++--
src/xmpsample.cpp | 11 ++++++++++-
test/data/xmpparser-test.out | 16 ++++++++++++----
xmpsdk/src/XMPMeta.cpp | 5 +++--
5 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/src/error.cpp b/src/error.cpp
index 83d7d21..a64e428 100644
--- a/src/error.cpp
+++ b/src/error.cpp
@@ -89,6 +89,7 @@ namespace Exiv2 {
ErrMsg( 44, N_("Failed to determine property name from path %1, namespace %2")), // %1=property path, %2=namespace
ErrMsg( 45, N_("Schema namespace %1 is not registered with the XMP Toolkit")), // %1=namespace
ErrMsg( 46, N_("No namespace registered for prefix `%1'")), // %1=prefix
+ ErrMsg( 47, N_("Aliases are not supported. Please send this XMP packet to ahuggel at gmx.net `%1', `%2', `%3'")), // %1=namespace, %2=property path, %3=value
// Last error message (message is not used)
ErrMsg( -2, N_("(Unknown Error)"))
diff --git a/src/xmp.cpp b/src/xmp.cpp
index ae32b89..e6a2998 100644
--- a/src/xmp.cpp
+++ b/src/xmp.cpp
@@ -413,7 +413,7 @@ namespace Exiv2 {
printNode(schemaNs, propPath, propValue, opt);
#endif
if (XMP_PropIsAlias(opt)) {
- // Todo: What should we do with these? Skip for now
+ throw Error(47, schemaNs, propPath, propValue);
continue;
}
if (XMP_NodeIsSchema(opt)) {
@@ -422,7 +422,7 @@ namespace Exiv2 {
if (XmpProperties::prefix(schemaNs).empty()) {
std::string prefix;
bool ret = meta.GetNamespacePrefix(schemaNs.c_str(), &prefix);
- if (!ret) throw Exiv2::Error(45, schemaNs);
+ if (!ret) throw Error(45, schemaNs);
prefix = prefix.substr(0, prefix.size() - 1);
XmpProperties::registerNs(schemaNs, prefix);
}
diff --git a/src/xmpsample.cpp b/src/xmpsample.cpp
index aa71740..3057e08 100644
--- a/src/xmpsample.cpp
+++ b/src/xmpsample.cpp
@@ -24,7 +24,7 @@ try {
// -------------------------------------------------------------------------
// Any properties can be set provided the namespace is known. Values of any
- // type can be assigned to an Xmpdatum (requires an output operator). The
+ // type can be assigned to an Xmpdatum, if they have an output operator. The
// default XMP value type for unknown properties is a simple text value.
xmpData["Xmp.dc.one"] = -1;
@@ -33,6 +33,8 @@ try {
xmpData["Xmp.dc.four"] = uint16_t(255);
xmpData["Xmp.dc.five"] = int32_t(256);
xmpData["Xmp.dc.six"] = false;
+
+ // In addition, there is a dedicated assignment operator for Exiv2::Value
Exiv2::XmpTextValue val("Seven");
xmpData["Xmp.dc.seven"] = val;
@@ -58,6 +60,13 @@ try {
v->read("Hello, World"); // qualifier
xmpData.add(Exiv2::XmpKey("Xmp.dc.description"), v.get());
+ // According to the XMP specification, Xmp.tiff.ImageDescription is an
+ // alias for Xmp.dc.description. Exiv2 treats an alias just like any
+ // other property and leaves it to the application to implement specific
+ // behaviour if desired.
+ xmpData["Xmp.tiff.ImageDescription"] = "TIFF image description";
+ xmpData["Xmp.tiff.ImageDescription"] = "lang=de-DE TIFF Bildbeschreibung";
+
// -------------------------------------------------------------------------
// 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 4bf0c04..7ae5e81 100644
--- a/test/data/xmpparser-test.out
+++ b/test/data/xmpparser-test.out
@@ -31,7 +31,7 @@ Xmp.exif.NativeDigest XmpText 414 36864,40960,40961,37
2c2
< <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="3.1.2-113">
---
-> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.1.1">
+> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core (Exiv2) 4.1.1">
35d34
< <rdf:li xml:lang="en-US">Blue Square Test File - .jpg</rdf:li>
37a37
@@ -100,7 +100,7 @@ Xmp.wine.Recommend XmpText 5 False
2c2
< <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="3.1.2-113">
---
-> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.1.1">
+> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core (Exiv2) 4.1.1">
4c4
< <rdf:Description rdf:about="uuid:0f410644-9396-11d9-bb8e-a67e6693b6e9"
---
@@ -214,7 +214,7 @@ Xmp.ns1.NestedStructProp/ns2:Outer/ns2:Middle/ns2:Inner/ns2:Field2 XmpText 12
< </rdf:RDF>
---
> <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
-> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.1.1">
+> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core (Exiv2) 4.1.1">
> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
> <rdf:Description rdf:about=""
> xmlns:ns1="ns:test1/"
@@ -292,6 +292,7 @@ Xmp.dc.seven XmpText 5 Seven
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.tiff.ImageDescription LangAlt 2 lang="de-DE" TIFF Bildbeschreibung, lang="x-default" TIFF image description
Xmp.xmpDM.videoFrameSize/stDim:w XmpText 2 16
Xmp.xmpDM.videoFrameSize/stDim:h XmpText 1 9
Xmp.xmpDM.videoFrameSize/stDim:unit XmpText 4 inch
@@ -304,11 +305,12 @@ Xmp.xmpBJ.JobRef[1]/stJob:role XmpText 12 Photographer
Xmp.xmpBJ.JobRef[2]/stJob:name XmpText 16 Wedding ceremony
Xmp.xmpBJ.JobRef[2]/stJob:role XmpText 8 Best man
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
-<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.1.1">
+<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core (Exiv2) 4.1.1">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:ns="myNamespace/"
+ xmlns:tiff="http://ns.adobe.com/tiff/1.0/"
xmlns:xmpDM="http://ns.adobe.com/xmp/1.0/DynamicMedia/"
xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#"
xmlns:xapBJ="http://ns.adobe.com/xap/1.0/bj/"
@@ -353,6 +355,12 @@ Xmp.xmpBJ.JobRef[2]/stJob:role XmpText 8 Best man
<rdf:value>James Bond</rdf:value>
<ns:role>secret agent</ns:role>
</dc:publisher>
+ <tiff:ImageDescription>
+ <rdf:Alt>
+ <rdf:li xml:lang="x-default">TIFF image description</rdf:li>
+ <rdf:li xml:lang="de-DE">TIFF Bildbeschreibung</rdf:li>
+ </rdf:Alt>
+ </tiff:ImageDescription>
<xmpDM:videoFrameSize
stDim:w="16"
stDim:h="9"
diff --git a/xmpsdk/src/XMPMeta.cpp b/xmpsdk/src/XMPMeta.cpp
index 765a40e..5efd091 100644
--- a/xmpsdk/src/XMPMeta.cpp
+++ b/xmpsdk/src/XMPMeta.cpp
@@ -552,8 +552,9 @@ XMPMeta::Initialize()
(void) RegisterNamespace ( "adobe:ns:meta/", "x", &voidPtr, &voidLen );
(void) RegisterNamespace ( "http://ns.adobe.com/iX/1.0/", "iX", &voidPtr, &voidLen );
-
- XMPMeta::RegisterStandardAliases ( "" );
+
+// 06-Oct-07, ahu: Do not use aliases. They result in unexpected behaviour.
+// XMPMeta::RegisterStandardAliases ( "" );
// Initialize the other core classes.
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list