Merge pull request #2053 from postscript-dev/update_XMP_tags_for_IPTC_2021.1

Update XMP tags for IPTC 2021.1
main
Peter 3 years ago committed by GitHub
commit 55712d489e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,13 +10,11 @@ __index2__
<h2>IPTC Core schema</h2> <h2>IPTC Core schema</h2>
<p>This schema specifies the IPTC Core XMP properties. <p>This schema specifies the IPTC Core XMP properties.
<ul> <ul>
<li>Exiv2 keys are <b><code>Xmp.iptc.&lt;Property&gt;</code></b></li> <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>
<li>Creator Contact Info sub-keys are nested: <b><code>Xmp.Iptc4xmpCore.CreatorContactInfo/Iptc4xmpCore:&lt;Property&gt;</code></b></li>
<li>The schema namespace URI is <b><code>http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/</code></b></li> <li>The schema namespace URI is <b><code>http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/</code></b></li>
<li>The preferred schema namespace prefix is <b><code>Iptc4xmpCore</code></b></li> <li>The preferred schema namespace prefix is <b><code>Iptc4xmpCore</code></b></li>
</ul> </ul>
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> 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>
<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>
<p>Click on a column header to sort the table.</p> <p>Click on a column header to sort the table.</p>

@ -13,12 +13,11 @@ __index2__
of more granular properties and further specialized rights related of more granular properties and further specialized rights related
properties from the PLUS metadata schema. properties from the PLUS metadata schema.
<ul> <ul>
<li>Exiv2 keys are <b><code>Xmp.iptcExt.&lt;Property&gt;</code></b></li> <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>
<li>The schema namespace URI is <b><code>http://iptc.org/std/Iptc4xmpExt/2008-02-29/</code></b></li> <li>The schema namespace URI is <b><code>http://iptc.org/std/Iptc4xmpExt/2008-02-29/</code></b></li>
<li>The preferred schema namespace prefix is <b><code>Iptc4xmpExt</code></b></li> <li>The preferred schema namespace prefix is <b><code>Iptc4xmpExt</code></b></li>
</ul> </ul>
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> 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>
<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>
<p>Click on a column header to sort the table.</p> <p>Click on a column header to sort the table.</p>

File diff suppressed because it is too large Load Diff

@ -345,6 +345,32 @@ namespace Exiv2 {
//! Shortcut for the printTagVocabulary template which requires typing the array name only once. //! Shortcut for the printTagVocabulary template which requires typing the array name only once.
#define EXV_PRINT_VOCABULARY(array) printTagVocabulary<EXV_COUNTOF(array), array> #define EXV_PRINT_VOCABULARY(array) printTagVocabulary<EXV_COUNTOF(array), array>
template <int N, const TagVocabulary (&array)[N]>
std::ostream& printTagVocabularyMulti(std::ostream& os, const Value& value, const ExifData*)
{
if (value.count() == 0) {
os << "(" << value << ")";
return os;
}
for (int i=0; i< value.count(); i++) {
if (i != 0)
os << ", ";
const TagVocabulary* td = find(array, value.toString(i));
if (td) {
os << exvGettext(td->label_);
}
else {
os << "(" << value.toString(i) << ")";
}
}
return os;
}
//! Shortcut for the printTagVocabularyMulti template which requires typing the array name only once.
#define EXV_PRINT_VOCABULARY_MULTI(array) printTagVocabularyMulti<EXV_COUNTOF(array), array>
// ***************************************************************************** // *****************************************************************************
// free functions // free functions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from system_tests import CaseMeta, path, check_no_ASAN_UBSAN_errors
class XmpIptcStandardsTest(metaclass=CaseMeta):
"""
Regression test for the issue described in:
https://github.com/Exiv2/exiv2/issues/1959
"""
url = "https://github.com/Exiv2/exiv2/issues/1959"
filename = path("$data_path/issue_1959_poc.xmp")
filename_save = path("$tmp_path/issue_1959_poc.xmp_save.out")
filename_out = path("$data_path/issue_1959_poc.xmp.out")
commands = ["$exiv2 -Pkvt $filename > $filename_save", "cmp $filename_save $filename_out"]
stderr = [""]*2
retval = [0]*2
compare_stdout = check_no_ASAN_UBSAN_errors

@ -73,7 +73,7 @@ class pr_1475_exif_xmp_avif(metaclass=system_tests.CaseMeta):
stderr = [ "" ] * len(commands) stderr = [ "" ] * len(commands)
stdin = [ "" ] * len(commands) stdin = [ "" ] * len(commands)
stdout = ["""Exif.Image.DateTime Ascii 20 2021:02:13 21:19:50 stdout = ["""Exif.Image.DateTime Ascii 20 2021:02:13 21:19:50
Xmp.iptcExt.DigitalSourceType XmpText 61 http://cv.iptc.org/newscodes/digitalsourcetype/digitalCapture Xmp.iptcExt.DigitalSourceType XmpText 61 Digital capture
Xmp.iptcExt.LocationCreated XmpBag 0 Xmp.iptcExt.LocationCreated XmpBag 0
Xmp.iptcExt.LocationShown XmpBag 0 Xmp.iptcExt.LocationShown XmpBag 0
Xmp.iptcExt.ArtworkOrObject XmpBag 0 Xmp.iptcExt.ArtworkOrObject XmpBag 0
@ -268,7 +268,7 @@ class pr_1475_metadata2_avif(metaclass=system_tests.CaseMeta):
stderr = [ "" ] * len(commands) stderr = [ "" ] * len(commands)
stdin = [ "" ] * len(commands) stdin = [ "" ] * len(commands)
stdout = ["""Exif.Image.DateTime Ascii 20 2021:02:13 21:25:32 stdout = ["""Exif.Image.DateTime Ascii 20 2021:02:13 21:25:32
Xmp.iptcExt.DigitalSourceType XmpText 61 http://cv.iptc.org/newscodes/digitalsourcetype/digitalCapture Xmp.iptcExt.DigitalSourceType XmpText 61 Digital capture
Xmp.iptcExt.LocationCreated XmpBag 0 Xmp.iptcExt.LocationCreated XmpBag 0
Xmp.iptcExt.LocationShown XmpBag 0 Xmp.iptcExt.LocationShown XmpBag 0
Xmp.iptcExt.ArtworkOrObject XmpBag 0 Xmp.iptcExt.ArtworkOrObject XmpBag 0

Loading…
Cancel
Save