Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added getxmp() method #5144

Merged
merged 24 commits into from Apr 1, 2021
Merged

Added getxmp() method #5144

merged 24 commits into from Apr 1, 2021

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

src/PIL/Image.py Outdated Show resolved Hide resolved
Changed list of single items dictionaries to dictionary
src/PIL/Image.py Outdated Show resolved Hide resolved
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
@UrielMaD
Copy link
Contributor Author

@UrielMaD 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
50 checks passed
@hugovk
Copy link
Member

@hugovk 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

@radarhere radarhere commented Apr 1, 2021

#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

@radarhere radarhere commented Jun 30, 2021

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
Linked issues

Successfully merging this pull request may close these issues.

3 participants