Quote:
Originally Posted by Doitsu
Apparently, AltTextAccessibility is an Exiv2 metadata entry. The closest EXIF equivalent is ImageDescription, which Pillow supports. Theoretically, Pillow is also supposed to support XML metadata via getxmp(), but I couldn't get the sample code to work.
The sample image referred to by BeckyEbook and DNSB contains the following metadata as plain text:
Code:
<Iptc4xmpCore:AltTextAccessibility>
<rdf:Alt>
<rdf:li xml:lang='x-default'>This is the Alt Text description to support accessibility in 2022.1</rdf:li>
<rdf:li xml:lang='en'>This is the Alt Text description to support accessibility in 2022.1</rdf:li>
</rdf:Alt>
</Iptc4xmpCore:AltTextAccessibility>
The sample image provided by the OP only contains an <rdf:li xml:lang="x-default"> entry.
Some StackOverflow users recommended searching for XMP metdata as text and parsing it with bs4.
|
That is an idea. I will read up on that.