Author Topic: IPTC Template: issue 4  (Read 4853 times)

Offline Bob Hendricks

  • Member
  • **
  • Posts: 82
    • View Profile
IPTC Template: issue 4
« on: February 21, 2020, 04:35:21 AM »
When one is writing to the xmp sidecar with exiftool, there is no tag for each of the three Supplemental Categories in the template in the standard xmp table.  Instead, there is a single tag SupplementalCategories which writes to PM 6 Supplemental Cat 1 variable as follows:

exiftool -xmp:SupplementalCategories="test data supp cats" outFile.xmp

writes "test data support cats" to the Supplemental Cat 1 variable.

The fix for this is easy.  User-defined tags can be added to the xmp table. I have added SuppCat1, SuppCat2 and SuppCat3 to my installation. Thus, when I write to these three variables, data are written correctly to each tag in the sidecar amp file.  However, when that sidecar is loaded into the template in PM 6, the data are not present. It appears that the code for the template needs to be fixed to allow it to read the three new tags from the sidecar and enter it into the associated template fields.

Is this something that I can do, or is it a fix that needs to be made in PM 6?

If this is a fix to the code, CameraBits needs to decide what tag name should be used for the three fields.  I will be happy to post the modification to the exiftool tables for this fix once the tag names are agreed to. In this way, at least PM users can all access these categories in the IPCT table in the same way.

Bob Hendricks
 

Bob Hendricks

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: IPTC Template: issue 4
« Reply #1 on: February 21, 2020, 07:10:35 AM »
Bob,

When one is writing to the xmp sidecar with exiftool, there is no tag for each of the three Supplemental Categories in the template in the standard xmp table.  Instead, there is a single tag SupplementalCategories which writes to PM 6 Supplemental Cat 1 variable as follows:

exiftool -xmp:SupplementalCategories="test data supp cats" outFile.xmp

writes "test data support cats" to the Supplemental Cat 1 variable.

The fix for this is easy.  User-defined tags can be added to the xmp table. I have added SuppCat1, SuppCat2 and SuppCat3 to my installation. Thus, when I write to these three variables, data are written correctly to each tag in the sidecar amp file.  However, when that sidecar is loaded into the template in PM 6, the data are not present. It appears that the code for the template needs to be fixed to allow it to read the three new tags from the sidecar and enter it into the associated template fields.

Is this something that I can do, or is it a fix that needs to be made in PM 6?

You've created custom XMP tags and PM does not have any system to map your custom tags to IPTC fields.

If this is a fix to the code, CameraBits needs to decide what tag name should be used for the three fields.  I will be happy to post the modification to the exiftool tables for this fix once the tag names are agreed to. In this way, at least PM users can all access these categories in the IPCT table in the same way.

Supplemental Categories are a holdover from the original IPTC specification.  But they're kind of odd.  You can't have a Supp Cat 3 without first having a Supp Cat 1 and Supp Cat 2, even if they're blank before you can have a Supp Cat 3.

If you want to see how it's done, why not write out some example XMP from the Metadata dialogs (either the Info or Template one will work) and fill in those fields and see what's produced?  Then you can interact with it from exiftool.

HTH,

-Kirk

Offline Bob Hendricks

  • Member
  • **
  • Posts: 82
    • View Profile
Re: IPTC Template: issue 4
« Reply #2 on: February 21, 2020, 11:28:45 AM »
If you enter data into each of the three supplemental categories in the template and then look at the sidecar with exiftool, you find that the data from each is all concatenated together and output in a single variable with the tag "Supplemental Categories" If you write data with exiftool to the tag "Supplemental Categories" it is written to Supp Cat 1.  There is no way to either read or write the data in each field individually.

Bob Hendricks

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: IPTC Template: issue 4
« Reply #3 on: February 21, 2020, 11:39:04 AM »
Bob,

If you enter data into each of the three supplemental categories in the template and then look at the sidecar with exiftool, you find that the data from each is all concatenated together and output in a single variable with the tag "Supplemental Categories" If you write data with exiftool to the tag "Supplemental Categories" it is written to Supp Cat 1.  There is no way to either read or write the data in each field individually.

Please post your XMP sidecar file.  Use the 'Attachments and other options' link when you're composing your reply to this message and there you'll be able to upload your file.

Thanks,

-Kirk

Offline Bob Hendricks

  • Member
  • **
  • Posts: 82
    • View Profile
Re: IPTC Template: issue 4
« Reply #4 on: February 22, 2020, 12:36:46 PM »
I am responding with two separate posts to the forum.  This post comprises data where I deleted the existing sidecar, cleared all data in the template, then wrote test data into the template as shown in the the attached screenshot. I then closed the template, which wrote a new sidecar to the same directory as my dummy image file as attached. finally, I opened the sidecar in exiftool as shown in the second attached screenshot.

What this test shows is that the three supplemental categories are concatenated into a single comma separated string and saved to the xmp tag "Supplementalcategories".

No data are saved in separate fields for the three individual categories.
Bob Hendricks

Offline Bob Hendricks

  • Member
  • **
  • Posts: 82
    • View Profile
Re: IPTC Template: issue 4
« Reply #5 on: February 22, 2020, 12:51:10 PM »
This is the first of two reverse data entries in the SupplementalCategories fields.

Here, I deleted the sidecar, and cleared any data in the template. Then I entered the following command

exiftool -xmp:supplementalcategories="data written to SupplementalCategories" as shown in the screenshot of the results of the command. This command created a new sidecar attached.

I then loaded the new sidecar. The screenshot of the template shows that the text entered into the tag appeared in the first of the three Supplemental categories.
Bob Hendricks

Offline Bob Hendricks

  • Member
  • **
  • Posts: 82
    • View Profile
Re: IPTC Template: issue 4
« Reply #6 on: February 22, 2020, 01:33:53 PM »
Here are the results of the third test.

As noted by Kirk, the tags "Category" and the three "Supplemental Categories" have been deprecated in the IPTC 2019.1 Specification.  This is likely why there are no tags for the thee supplemental categories in the xmp tag list. (I am not sure why there is one for "Categories" and especially one for "Supplemental Categories".) However, the instructions prepared by Phil Harvey show how custom (user-defined) tags may be added to various tag groups. Following these instructions, I created three new tags that I added to my xmp list. These are: SuppCat1, SuppCat2, and SuppCat3. That I can load data into the sidecar for these three tags is shown in the attached screenshot.  Understandably, when this sidecar is loaded into PM 6, these data do not appear in the variable list--PM has not implemented code that reads/writes these three tags.

Although the three supplemental fields have been deprecated by IPTC, many users have likely made good use of them. Once we learn  what Kirk's thinking is on this issue, it may be desirable to ask for a new feature in PM in which these three fields become fully compatible with the xmp group.

Bob
Bob Hendricks