18

I recently uploaded this image in chat.

Original image

However, on upload, the image was rotated 90 degrees to the right, for no obvious reason that I can discern. I didn't ask for it!

Rotated 90 degrees

What happen?

15
[michael@challenger:~]$ jhead DSCN0873.jpg 
Header missing JFIF marker
File name    : DSCN0873.jpg
File size    : 120421 bytes
File date    : 2008:12:27 15:08:01
Camera make  : NIKON
Camera model : COOLPIX S51
Date/Time    : 0000:00:00 00:00:00
Resolution   : 600 x 800
Orientation  : rotate 90
Flash used   : No (auto)
Focal length :  7.9mm  (35mm equivalent: 47mm)
Exposure time: 0.0031 s  (1/320)
Aperture     : f/6.9
ISO equiv.   : 100
Exposure bias: -0.70
Whitebalance : Auto
Metering Mode: pattern
Exposure     : program (auto)

Looks like the rotation metadata got missed due to the missing header.

After fixing header:

cp DSCN0873.jpg DSCN0873-fixed.jpg
jhead -mkexif DSCN0873-fixed.jpg
jhead -te DSCN0873.jpg DSCN0873-fixed.jpg

Fixed

But wait! Those dimensions... let's just nuke the rotation data:

jhead -norot DSCN0873-fixed.jpg

Fixed, really

So as it turns out, imgur was acting correctly.

  • I used to have this problem on my old Android device. If you rotate an image in the Gallery and forget you rotated it, most uploaders won't see that rotation change and upload the image in its original form. That's why my camera's auto-rotate always drove me nuts. – animuson Dec 2 '13 at 19:34
  • 1
    So the browser missed the rotation data and imgur didn't. OK, not a bug (at least not here)... – Michael Hampton Dec 2 '13 at 19:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .