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

Running exif_autotransform on images with orientation flag == 4 and == 2 results in an image with incorrect orientation flag #37

Open
YuseqYaseq opened this issue Apr 17, 2023 · 0 comments

Comments

@YuseqYaseq
Copy link

Code to reproduce:

image = JPEGImage(blob=jpeg_blob)
image = image.exif_autotransform()
assert image.exif_orientation = 1

The jpeg_blob should have exif orientation flag set as 4 or 2.

Expected results:
Process finishes with 0.

Actual results:
AssertionError is raised because image.exif_orientation is equal to 4 or 2.

The issue seems to be due to the fact that JPEGImage.flip() does not set exif_orientation as 1.

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

No branches or pull requests

1 participant