Hi,
I'm currently working with the friendly folks at the IPTC to see how good my software (thanks to ExifTool) scores in their new test suite (https://iptc.org/standards/photo-metadata/interoperability-tests).
I have only two issues left. Probably both my fault, but I would welcome some advice.
1. The XMP2IPTC.args file does not seem to map Intellectual Genre and Subject Code from XMP to IPTC. Or at least not into the tags the IPTC test suite is expecting.
I see in the XMP2IPTC.args file that the mapping is commented out:
#-IPTC:ObjectAttributeReference < XMP-iptcCore:IntellectualGenre
#-IPTC:SubjectReference < XMP-iptcCore:SubjectCode
which might explain that? But, knowing ExifTool, this may just be another of these things where ExifTool does some things automagically...
2. I cannot find the tag the IPTC expects under the name Image Region > Other Metadata Property. All other IPTC Ext region tags are there and I can fill them.
ExifTool (and in small part my software) passes all other tests. Which is very cool.
Quote from: Mac2 on February 16, 2022, 12:30:27 PM
2. I cannot find the tag the IPTC expects under the name Image Region > Other Metadata Property. All other IPTC Ext region tags are there and I can fill them.
I believe this covered by this sentence from the XMP ImageRegion Struct (https://exiftool.org/TagNames/XMP.html#ImageRegion).
As well as the fields defined below, this structure may contain any top-level XMP tags, but since they aren't pre-defined the only way to add these tags is to write ImageRegion as a structure with these tags as new fields.
So since there can be any other XMP added here, the only way to add them is to build the structure to include them and use the
-struct option (https://exiftool.org/exiftool_pod.html#struct---struct).
I thought this sounded familiar, but couldn't find a forum post. Then I remembered it was for a similar option with the MWG extension. See here (https://exiftool.org/forum/index.php?topic=13080.0).
Thanks for the information. This sounds complicated (my software only rarely writes structs directly and mostly relies on ExifTools de-/composition feature). I'll look into this when I have some time. It's an obscure tag anyway.
Any idea about why genre / subject code are not mapped from XMP->IPTC or why these mappings are commented out?
Quote from: Mac2 on February 16, 2022, 12:30:27 PM
1. The XMP2IPTC.args file does not seem to map Intellectual Genre and Subject Code from XMP to IPTC. Or at least not into the tags the IPTC test suite is expecting.
I see in the XMP2IPTC.args file that the mapping is commented out:
#-IPTC:ObjectAttributeReference < XMP-iptcCore:IntellectualGenre
#-IPTC:SubjectReference < XMP-iptcCore:SubjectCode
I don't have time to look into this in detail at the moment, but if it is commented out it would be because the tags contain information that can't be simply copied from one to the other.
- Phil
Offhand, I can see that XMP-iptcCore:IntellectualGenre is a simple string, while IPTC:ObjectAttributeReference is a list type tag, minimum of 4 characters.
IPTC:SubjectReference and XMP-iptcCore:SubjectCode are both list type tags. It looks like XMP-iptcCore:SubjectCode is supposed to be an 8 digit code from a very long list (https://cv.iptc.org/newscodes/subjectcode/) while IPTC:SubjectReference has a minimum of 13 characters and maximum of 236 characters, I'm guessing there would have to be some translation done to copy between each tag.
@StarGeek: Sounds right. Thanks for looking into this.
- Phil
Quote from: StarGeek on February 17, 2022, 10:46:21 AM
Offhand, I can see that XMP-iptcCore:IntellectualGenre is a simple string, while IPTC:ObjectAttributeReference is a list type tag, minimum of 4 characters.
IPTC:SubjectReference and XMP-iptcCore:SubjectCode are both list type tags. It looks like XMP-iptcCore:SubjectCode is supposed to be an 8 digit code from a very long list (https://cv.iptc.org/newscodes/subjectcode/) while IPTC:SubjectReference has a minimum of 13 characters and maximum of 236 characters, I'm guessing there would have to be some translation done to copy between each tag.
This sounds like Phil has commented out the mapping for this reason.
I will need to think about this. As I've told the IPTC people, the legacy IPTC format is, at least for me and my user base, legacy. The XMP-based IPTC is so much more versatile.
My software does not create new legacy IPTC records if a file has none, it only updates (via ExifTool) existing records.
I'm not sure if implementing this mapping in IMatch (and running it after running XMP2IPTC.args) is worth the trouble.
Thank to you both for looking into this.