OpenOversight icon indicating copy to clipboard operation
OpenOversight copied to clipboard

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

Open parhamr opened this issue 4 years ago • 2 comments

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:

  • https://jdhao.github.io/2019/07/31/image_rotation_exif_info/
  • https://sirv.com/help/articles/rotate-photos-to-be-upright/

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

parhamr avatar Aug 15 '20 04:08 parhamr

Reproducible with EXIF:

Orientation: 6 (Rotated 90° CCW)

(iPhones and iPads happen to produce images like this)

parhamr avatar Aug 18 '20 02:08 parhamr

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.

abandoned-prototype avatar Sep 01 '20 04:09 abandoned-prototype