Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Tags #146

Closed
dominiklippl opened this issue Jul 6, 2022 · 8 comments
Closed

Missing Tags #146

dominiklippl opened this issue Jul 6, 2022 · 8 comments

Comments

@dominiklippl
Copy link

dominiklippl commented Jul 6, 2022

Hello, I am currently trying to extract all the metadata of an image into an XML file.
For this I used the following command, exiftool -tagsFromFile IPTC-PhotometadataRef-Std2021.1.jpg -all:all -U metadata.xml.
This should normally extract all meta information according to the documentation, but unfortunately this is not completely the case. In particular, I am missing the AltTextAccessibility, AltTextAccessibility-en.
For testing I used the attached picture.

IPTC-PhotometadataRef-Std2021 1

@dominiklippl dominiklippl changed the title Missing Iptc4xmpCore Tag Missing Tags Jul 6, 2022
@StarGeekSpaceNerd
Copy link
Collaborator

The image you link contains the tags you list and exiftool extracts them properly

C:\>exiftool -G1 -a -s -Alt* Y:\!temp\ccc\c\177564602-28af4586-2742-41eb-aa2f-44a6ef22d9f8.jpg
[XMP-iptcCore] AltTextAccessibility : This is the Alt Text description to support accessibility in 2021.1
[XMP-iptcCore] AltTextAccessibility-en : This is the Alt Text description to support accessibility in 2021.1

What is the contents of your metadata.xml in your original command?

@dominiklippl
Copy link
Author

But you don't used the exiftool -tagsFromFile command to extract the metadata.
Here is my metadata.xml file, https://pastebin.com/fccVgEeG.

@StarGeekSpaceNerd
Copy link
Collaborator

Ah, so your "xml" file is actually the XMP data from the example file. And your example is confusing because your copying the data back into the same file.

When I use the -TagsFromFile option to copy from the above image into a test image like this
C:\>exiftool -P -overwrite_original -TagsFromFile Y:\!temp\ccc\c\177564602-28af4586-2742-41eb-aa2f-44a6ef22d9f8.jpg -all:all y:\!temp\Test4.jpg
1 image files updated

The output is pretty much identical. See here. The Adobe block isn't copied, but that's because it's considered unsafe as it can change the colors of the image.

Your pastebin text doesn't contain AltTextAccessibility tag you mention, so I assume it's the after. I extracted the raw XMP from the above file with
exiftool -b -xmp Y:\!temp\ccc\c\177564602-28af4586-2742-41eb-aa2f-44a6ef22d9f8.jpg >metadata.xml
Listed and saved the output from that file, then ran your command
exiftool -tagsFromFile metadata.xml -all:all -U metadata.xml
and listed the output from that. Again, the output was nearly the same, only difference being the file tags.

Exiftool has no problem writing any of the tags in that reference image. And if you look carefully, you'll see that they used exiftool to write all the data in the first place.

@dominiklippl
Copy link
Author

Right, I also just noticed that the command is wrong, I have edited my question and corrected the command.
I think I need to take a moment and explain what I'm trying to do in the first place.
I want to use exiftool to read the metadata from an image and store it in a database (MongoDB) in a structured way.
My approach is to extract the data via exiftool -tagsFromFile IPTC-PhotometadataRef-Std2021.1.jpg -all:all -U metadata.xml into a XML file (https://pastebin.com/fccVgEeG), read it via the system, convert it into a JSON object (https://pastebin.com/qYDN6PWu) and store it in the database.
This mechanism is already implemented and works, I just noticed that the AltTextAccessibility and AltTextAccessibility-en text is missing.

@StarGeekSpaceNerd
Copy link
Collaborator

StarGeekSpaceNerd commented Jul 7, 2022

My output when running your command includes these tags. The only thing that I can figure is that you're running a version of exiftool that's older than ver 11.74, over 2½ years old, as that is when support for IPTC Extension version 1.5 tags was added.

You might instead want to look into either the -X (-xmlFormat) option or the -j (-json) option. The command you're using creates an XMP file, not an XML file, and will not contain any tags that exiftool doesn't know how to write. Nor will it contain any IPTC IIM/Legacy or EXIF. Either of these options will include these other tags.

@dominiklippl
Copy link
Author

Ok, I got the terms mixed up, sorry. I need an XMP file not an XML.
But I still don't understand why the Alt text should not be in the XMP file, the AltTextAccessibility text is part of the IPTC core (https://iptc.org/std/photometadata/specification/IPTC-PhotoMetadata#alt-text-accessibility) in the XMP specification (http://iptc.org/std/photometadata/specification/iptc-pmd-techreference_2021.1.yml) it is also listed.

@StarGeekSpaceNerd
Copy link
Collaborator

I had to double check, but I was incorrect about the version. The AltTextAccessibility was added in version 12.33. If your command isn't writing those tags, it must be older than ver 12.33. You will need to upgrade to a newer version if you want to write them.

Run
exiftool -ver
to check the version

@dominiklippl
Copy link
Author

Thank you very much, that was the solution. I still had the version 12.30, after upgrading to 12.42 the tags appeared. Thanks again for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants