Update XMP IPTC tags to 2021.1 standard
Changes: 1. Add/update tags. 2. According to the standard, several tags in `Xmp.iptc.<property>` and `Xmp.iptcExt.<property>`, had been wrongly added, as they only exist as part of a struct used by a tag. The incorrect tags have been marked as deprecated in the label and description. 3. Update existing test with translated output. Ref: [IPTC Photo Metadata Standard 2021.1](https://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata-2021.1.html)
This commit is contained in:
+1502
-39
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.
|
||||
#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
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ class pr_1475_exif_xmp_avif(metaclass=system_tests.CaseMeta):
|
||||
stderr = [ "" ] * len(commands)
|
||||
stdin = [ "" ] * len(commands)
|
||||
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.LocationShown XmpBag 0
|
||||
Xmp.iptcExt.ArtworkOrObject XmpBag 0
|
||||
@@ -268,7 +268,7 @@ class pr_1475_metadata2_avif(metaclass=system_tests.CaseMeta):
|
||||
stderr = [ "" ] * len(commands)
|
||||
stdin = [ "" ] * len(commands)
|
||||
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.LocationShown XmpBag 0
|
||||
Xmp.iptcExt.ArtworkOrObject XmpBag 0
|
||||
|
||||
Reference in New Issue
Block a user