Skip to content

Conversation

@UrielMaD
Copy link
Contributor

@UrielMaD UrielMaD commented Dec 28, 2020

Fixes #5076

I propose to return an object with tags names and its values because it would get easier for the user to find what he's looking for, instead of giving the tag number as the getexif() function.

The tags returned are the ones that came in the XML tree contained in the image, so there's no need for having a tags table.

Changes proposed in this pull request:

Feature for retrieving XMP tags from image contained in an object.
This is how it the feature looks

from PIL import Image
im = Image.open("url.jpg")
print(im.getxmp())

and the resultant object:
Captura de Pantalla 2020-12-27 a la(s) 18 13 32

Changed list of single items dictionaries to dictionary
Co-authored-by: Andrew Murray <[email protected]>
@UrielMaD
Copy link
Contributor Author

UrielMaD commented Jan 3, 2021

@radarhere changes accepted!, you're right, it sounds clearer. Thank you.

@hugovk hugovk merged commit 6812205 into python-pillow:master Apr 1, 2021
@hugovk
Copy link
Member

hugovk commented Apr 1, 2021

Thanks! I'll add this to the release notes.

@radarhere radarhere changed the title Feature: XMP tags function integrated at src/PIL/image.py Added getxmp() method Apr 1, 2021
@radarhere
Copy link
Member

#5376 moved this method into JpegImageFile, since the method fetches data from applist, which is a JpegImageFile property.

@radarhere radarhere mentioned this pull request Jun 9, 2021
@radarhere
Copy link
Member

Note that in Pillow 8.3.0, the output of getxmp() has changed, due to #5455

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: implement im.getxmp() to return all embedded XMP meta data as XML

3 participants