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

Bug: photos are upright in tagging workflow but rotated 90° when cropped #802

Open
parhamr opened this issue Aug 15, 2020 · 2 comments
Open

Comments

@parhamr
Copy link
Contributor

parhamr commented Aug 15, 2020

I’ve seen this happen with a set of photos that came from a particular camera/phone, and I have a hunch for the cause. First — a user story:

  1. Given I am logged in
  2. And I have permissions to tag faces in photos
  3. When I am tagging a face in a certain photo
  4. And the photo appears at the correct orientation in the tagging interface
  5. Then I see the cropped officer tag is rotated 90º from how it had appeared in the tagging interface
  6. And the size and shape of the crop are true to how I had input them

Expected result: the cropped image is “upright” in the same orientation as the tagging interface
Actual result: certain cropped images are rotated 90º (most frequently counter clockwise)

Example image: https://www.openoversight.com/officer/12035

My suspicion is the tagging interface is correctly using an EXIF property like orientation, e.g:

…and then the processing routine is either ignoring that value or incorrectly applying the orientation.

@parhamr
Copy link
Contributor Author

parhamr commented Aug 18, 2020

Reproducible with EXIF:

Orientation: 6 (Rotated 90° CCW)

(iPhones and iPads happen to produce images like this)

@abandoned-prototype
Copy link
Collaborator

Thanks for your work on this @parhamr I ran into a similar problem, might be the same problem or connected, so adding it here. When tagging I ran into several photos that are shown rotated by 90° https://openoversight.com/cop_face/department/1/image/1593, but the image as it comes from S3 is shown in the right orientation in the browser. When I tag a cop in that rotated image it ends up tagged 180° rotated.
Example of that: On https://openoversight.com/cop_face/department/1/image/3056 (appearing 90° rotated clockwise) I tagged https://openoversight.com/officer/12982 on the "right", but ended up with the legs of the officer on the left.

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 a pull request may close this issue.

2 participants