Skip to content

Conversation

@radarhere
Copy link
Member

Resolves #5546

The instance points out that in exif_transpose(),

exif = image.getexif()
...
del exif[0x0112]
transposed_image.info["exif"] = exif.tobytes()

we're deleting the orientation data from the original image's EXIF object (and then, as intended, saving it to the new image instance).

Instead, this PR changes it to

exif = image.getexif()
...
transposed_exif = transposed_image.getexif()
del transposed_exif[0x0112]
transposed_image.info["exif"] = transposed_exif.tobytes()

so that we are deleting the orientation data from the new image's EXIF object only, leaving the original image unaffected.

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.

exif_transpose overwrites the original image exif

2 participants