drainingsun/ybat

Images are rotated and annotations are saved as rotations

Closed this issue · 4 comments

I'm capturing data and annotating it . Here is an example image

image

However, when I actually upload it in the tool:
image

The image is rotated 90 degrees. The problem is that this causes the actual annotations to be incorrect unless I now manually rotate the image as well. Is there a way I can rotate the image inside of boobs (or not have it rotate at all?). Alternatively, the annotations could just be rotated as well. Thanks!

Note that these images were collected from a phone

Can you provide me with the original image that's being rotated? Also what OS and browser are you using? Does that happen to all images? I strongly suspect it's related to image meta data. If I have a sample, I could try finding a solution to this.

Hey @drainingsun, thanks for the response

I found the problem and it is definitely related to the fact that it's taken from the phone. I think there is a tag called exif that corrects the phones angle depending on the orientation it was taken from. Some browsers ignore this tag though hence why the angle is different when viewed from the phone versus from a browser. I ended up fixing the problem using ImageMagick to convert all my images in a directory as shown here

I am on Windows and Chrome. It happens to all images because they were all taken from my phone.

I am happy to send you an image with the problem. However, I'm not sure what the standard way of attaching files is on Github.

Also, I am fine closing this issue

After a brief research it seems that browsers do not handle exif data properly and in general there is no consensus how it should be handled. There are solutions, though. Questions is, whether it is necessary. Personally I'd like to close this issue and re-investigate if more people encounter same issue.