from PIL import Image
with Image.open(filename) as im:
    for segment, content in im.applist:
        marker, body = content.split('\x00', 1)
if segment == 'APP1' and marker == 'http://ns.adobe.com/xap/1.0/':
    pass
Чтение данных изображения XMP в Python