View Single Post
Old 05-14-2024, 04:51 PM   #13
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,743
Karma: 24031403
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KevinH View Post
So @Doitsu, any luck using a recent Pillow to extract it?
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.
Doitsu is offline   Reply With Quote