Skip to content

Commit 55712d4

Browse files
Merge pull request #2053 from postscript-dev/update_XMP_tags_for_IPTC_2021.1
Update XMP tags for IPTC 2021.1
2 parents b0318c3 + da320f3 commit 55712d4

File tree

8 files changed

+3688
-48
lines changed

8 files changed

+3688
-48
lines changed

doc/templates/tags-xmp-iptc.html.in

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ __index2__
1010
<h2>IPTC Core schema</h2>
1111
<p>This schema specifies the IPTC Core XMP properties.
1212
<ul>
13-
<li>Exiv2 keys are <b><code>Xmp.iptc.&lt;Property&gt;</code></b></li>
14-
<li>Creator Contact Info sub-keys are nested: <b><code>Xmp.Iptc4xmpCore.CreatorContactInfo/Iptc4xmpCore:&lt;Property&gt;</code></b></li>
13+
<li>The Exiv2 keys are either <b><code>Xmp.iptc.&lt;Property&gt;</code></b> or <b><code>Xmp.Iptc4xmpCore.&lt;Property&gt;</code></b></li>
1514
<li>The schema namespace URI is <b><code>http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/</code></b></li>
1615
<li>The preferred schema namespace prefix is <b><code>Iptc4xmpCore</code></b></li>
1716
</ul>
18-
Reference: <a href="http://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata" title="IPTC Core Specification Version 1.2">"IPTC Core" Specification Version 1.2</a></p>
19-
<p>Note: Exiv2 uses <b><code>iptc</code></b> (rather than <code>Iptc4xmpCore</code>) as the group name for keys of IPTC Core schema properties.</p>
17+
Reference: <a href="http://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata" title="IPTC Core Metadata Schema 1.3 specification">IPTC Core Metadata Schema 1.3 specification</a></p>
2018

2119
<p>Click on a column header to sort the table.</p>
2220

doc/templates/tags-xmp-iptcExt.html.in

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@ __index2__
1313
of more granular properties and further specialized rights related
1414
properties from the PLUS metadata schema.
1515
<ul>
16-
<li>Exiv2 keys are <b><code>Xmp.iptcExt.&lt;Property&gt;</code></b></li>
16+
<li>The Exiv2 keys are either <b><code>Xmp.iptcExt.&lt;Property&gt;</code></b> or <b><code>Xmp.Iptc4xmpExt.&lt;Property&gt;</code></b></li>
1717
<li>The schema namespace URI is <b><code>http://iptc.org/std/Iptc4xmpExt/2008-02-29/</code></b></li>
1818
<li>The preferred schema namespace prefix is <b><code>Iptc4xmpExt</code></b></li>
1919
</ul>
20-
Reference: <a href="http://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata" title="IPTC Extension Specification Version 1.2">IPTC Extension Specification Version 1.2</a> standard</p>
21-
<p>Note: Exiv2 uses <b><code>iptcExt</code></b> (rather than <code>Iptc4xmpExt</code>) as the group name for keys of IPTC Extension schema properties.</p>
20+
Reference: <a href="http://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata" title="IPTC Extension Metadata Schema 1.6 specification">IPTC Extension Metadata Schema 1.6 specification</a></p>
2221

2322
<p>Click on a column header to sort the table.</p>
2423

src/properties.cpp

Lines changed: 1504 additions & 39 deletions
Large diffs are not rendered by default.

src/tags_int.hpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,32 @@ namespace Exiv2 {
345345
//! Shortcut for the printTagVocabulary template which requires typing the array name only once.
346346
#define EXV_PRINT_VOCABULARY(array) printTagVocabulary<EXV_COUNTOF(array), array>
347347

348+
template <int N, const TagVocabulary (&array)[N]>
349+
std::ostream& printTagVocabularyMulti(std::ostream& os, const Value& value, const ExifData*)
350+
{
351+
if (value.count() == 0) {
352+
os << "(" << value << ")";
353+
return os;
354+
}
355+
356+
for (int i=0; i< value.count(); i++) {
357+
if (i != 0)
358+
os << ", ";
359+
const TagVocabulary* td = find(array, value.toString(i));
360+
if (td) {
361+
os << exvGettext(td->label_);
362+
}
363+
else {
364+
os << "(" << value.toString(i) << ")";
365+
}
366+
}
367+
368+
return os;
369+
}
370+
371+
//! Shortcut for the printTagVocabularyMulti template which requires typing the array name only once.
372+
#define EXV_PRINT_VOCABULARY_MULTI(array) printTagVocabularyMulti<EXV_COUNTOF(array), array>
373+
348374
// *****************************************************************************
349375
// free functions
350376

0 commit comments

Comments
 (0)