MikeKovarik / exifr

📷 The fastest and most versatile JS EXIF reading library.
https://mutiny.cz/exifr/
MIT License
1.07k stars 70 forks source link

Support for recent accessibility IPTC fields #118

Closed nhoizey closed 10 months ago

nhoizey commented 11 months ago

"Alt Text (Accessibility)" and "Extended Description (Accessibility)" where added in IPTC 2 years ago: Oct 27 2021: IPTC Announces New Properties in Photo Metadata to Make Images More Accessible.

They are supported in PhotoMechanic for a year already, for at least a year in Adobe Bridge, and have just been added in Adobe Lightroom Classic.

To explain the use case for these 2 new fields, here's an extract from the article about Photo Mechanic:

Alt text is a brief textual description of the content and function of an image that is placed within the HTML alt attribute and other places where text descriptions of visual content may be useful.

Extended descriptions (AKA long descriptions) are for complex images with a lot of relevant information contained within the image (i.e., charts, maps, diagrams). In this case, the alt text identifies and summarizes the content and function of the image, and the extended description continues the description to provide a meaningful text alternative to the image.

exiftool shows these fields as [XMP-iptcCore] AltTextAccessibility and [XMP-iptcCore] ExtDescrAccessibility.

Would it be possible to support these 2 fields in exifr?

nhoizey commented 11 months ago

When uploading an image in https://mutiny.cz/exifr/ with content in these fields, I see them in the raw output.

nhoizey commented 11 months ago

Ok, I see how to get these fields:

options = { xmp: { pick: ['AltTextAccessibility', 'ExtDescrAccessibility'] } };
nhoizey commented 11 months ago

It looks however like I get all XMP fields in the output, not just AltTextAccessibility and ExtDescrAccessibility despite the pick option.

nhoizey commented 10 months ago

Initial “issue” is not relevant anymore, opening a new issue for the last part: