Incorrectly Rotated Images

Posted by: Ryan 3 years ago
Categories: Metaposts
Depending on which browser you use to view this site, images might sometimes show up sideways or upside down if uploaded from a phone. Here is a (slightly technical) explanation of why this is happening:
If you take a picture on your phone while holding it sideways or upside down, the phone recognizes it is being held that way and it can correct for that rotation. However, if you look at the actual data of the photo, the rotation is not actually corrected. The photo data is still saved sideways/upside down - the phone just added a little hidden note to the photo that explains how it should be rotated. Phones do this because it's much faster for the phone to just save an incorrectly rotated image along with a note than it is to actually rotate the image. This way, the phone can save a photo quickly and almost instantly be ready to take another photo.
Some browsers know to look at that little hidden note and to rotate an image based on the note; for example, the built-in browser on the iphone does this automatically. Some browser don't. I actually found the bug report on this for the Chrome browser (bad news, the bug report is from 2010 and its still not "fixed"). Most non-mobile browsers seem to be holding off on "fixing" this because a unified standard hasn't been set yet. Android phones and iPhones write those hidden notes differently at the moment.
In the old version of comet, I wrote a nice piece of code to automatically fix the rotation. For this version of comet, the back-end is a bit more complicated and I am not 100% sure what the best method of fixing this will be (I have a few ideas, but I haven't tested them out yet).
So - long story short - we will need to live with the silly sideways or upside down photos for a little while. If you look at the site on your phone, it should be fine. Once I fix this, I will delete this post and we will all pretend like this site was always perfect.


There are currently no comments

New Comment

Not logged in!  or 


required (not published)


© 2017. All rights reserved.