mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-22 13:14:45 +03:00
xmp feature
This commit is contained in:
parent
65af124c09
commit
6138d4612e
|
@ -1319,7 +1319,24 @@ class Image:
|
|||
return self._exif
|
||||
|
||||
def getxmp(self):
|
||||
return "Hello World"
|
||||
|
||||
for segment, content in self.applist:
|
||||
if segment == 'APP1':
|
||||
marker, xmp_tags = content.rsplit(b'\x00', 1)
|
||||
#print(marker)
|
||||
print(xmp_tags)
|
||||
if marker == b'http://ns.adobe.com/xap/1.0/':
|
||||
print(xmp_tags.decode('latin-1'))
|
||||
root = ET.fromstring(xmp_tags)
|
||||
print(root)
|
||||
for element in root.findall('.//'):
|
||||
print(element.tag.split('}')[1])
|
||||
print(element.attrib)
|
||||
for child, value in element.attrib.items():
|
||||
print(child.split('}')[1] + ": " + value)
|
||||
|
||||
|
||||
return root
|
||||
|
||||
def getim(self):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user