Skip to content

Conversation

MoralCode
Copy link
Contributor

fixes #46

@wilsonmcdade
Copy link
Owner

Looking at the code, I'm worried that preserving the EXIF data as you are will retain location data, but I wasn't able to prove that to myself with testing. Is that something you've managed to avoid in a way that I don't understand?

That's my only concern with this though, looks good otherwise :)

@MoralCode
Copy link
Contributor Author

I suspect if you wanted, you could look up the specific EXIF_TAGS values for location and explicitly remove them - I'll be honest that I didnt think of that, but that would probably be a good change to make

@MoralCode
Copy link
Contributor Author

looks like getexif() returns an instance of this class:
https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Exif

Unsure whether the best plan is to try and create an empty one and copy the desired parts over (width, height, orientation, etc) or just strip the GPS though

@wilsonmcdade
Copy link
Owner

Yeah I would err on the side of creating an empty exif object and copying over desired pieces of data

@MoralCode
Copy link
Contributor Author

Yeah I would err on the side of creating an empty exif object and copying over desired pieces of data

This is gonna be a fair bit of work to go through all of these and determine what is desireable.

If you have a list of which ones are desirable I could maybe try it, but I haven't found easy examples of "create an empty exif object" within the limited time i have to make changes for backporting to TV

Maybe this should be a 2-part PR, ship this (possibly with a simple GPS stripping) and move the full version to an issue for the TV team to work on at some point

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Image resize with PIL not respecting EXIF orientation data

2 participants