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 "exif" keyword argument to TIFF saving #5575

Merged
merged 3 commits into from Sep 6, 2021

Conversation

radarhere
Copy link
Member

Resolves #4940

#5416 allowed getexif() to read TIFF tag_v2 data. This PR allows that data to be saved again, using the exif keyword argument.

im.save("out.tiff", exif=im.getexif()

Comment on lines +1145 to +1147
# reset buffered io handle in case fp
# was passed to libtiff, invalidating the buffer
self.fp.tell()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is copied from

# reset buffered io handle in case fp
# was passed to libtiff, invalidating the buffer
self.fp.tell()

@radarhere radarhere changed the title Added "exif" keyword argument to TIFF saving for Image.Exif instance Added "exif" keyword argument to TIFF saving Jul 4, 2021
@dbuscombe-usgs
Copy link

Is there some way I can upvote this? There is currently NO library for python (that I know) that will create tiffs from arbitrary arrays and exif data. It would be a huge benefit to a lot of people if PIL would support writing exif in the way that this PR deals with. Thanks!

@hugovk
Copy link
Member

hugovk commented Sep 6, 2021

@dbuscombe-usgs It should be in Pillow 8.4.0, to be released next month.

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conflict needs resolving.

@hugovk hugovk merged commit ba7502c into python-pillow:master Sep 6, 2021
@radarhere radarhere deleted the tiff_exif branch September 6, 2021 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TIFF Image tags are not available
3 participants