PDA

View Full Version : Image Rotation Inconsistencies: EXIF Tags and You



piņardilla
05-08-2015, 12:30 AM
We've had an issue recently where images may appear correctly oriented when viewed directly, but sideways or upside-down in thumbnails and on submission pages (or vice versa). This is particularly an issue because proper image rotation is required by our Community Guidelines (https://www.weasyl.com/policy/community). (§ II.A.1)


A. Visual Art

1. Must not be improperly rotated, blurry, or show a portion of the scanner bed.

The cause of the problem is when the device that captured the image uses an EXIF (metadata) tag to adjust the rotation of the image, rather than re-processing it. This primarily happens with cameras. The problem is that this tag doesn't actually change the image data at all, it's just an added instruction that tells other programs how it should be displayed. However, many major browsers ignore this tag when an image is displayed inline on a website, resulting in inconsistency in its orientation depending on how it is being viewed. We are looking into a solution to detect and fix these problems as images are uploaded to Weasyl, but in the meantime, here's a workaround to ensure your images are properly rotated regardless of EXIF tags using Irfanview (http://www.irfanview.com/).

Irfanview (http://www.irfanview.com/) is a fast, lightweight basic image editor that is handy for image rotation, rescaling and cropping. Despite being a small program, it's fairly feature-rich. The following option under Options -> Properties/Settings (keyboard shortcut: P) toggles whether Irfanview will read the EXIF rotation tag or not:

http://i.imgur.com/TzQ387c.png

You can test if an image will be affected by this problem by opening it with Irfanview, toggling this option, and then re-opening the file (keyboard shortcut: Shift+R). If the orientation changes, the image will be affected. To fix the problem, click Rotate Left or Rotate Right under the Image menu (keyboard shortcuts: L/R) until it appears right-side-up, and save the image. It will re-process the image, clobbering the EXIF rotation tag and hardcoding the proper orientation, regardless of whether the EXIF data option in the screenshot above is checked or not.

Strictly speaking, you don't even have to check whether the image uses an EXIF rotation tag or not. Just open the image with Irfanview, adjust its rotation if necessary, save it, and it will work.

For non-Windows users, GIMP (http://www.gimp.org/) will also check for EXIF rotation when an image is loaded and will pop-up a dialog box asking you what you want to do with it. Click "Rotate" if it appears and save the image. Windows users can also download and use a Windows port of GIMP, but it's a more resource-intensive application than Irfanview.

Thank you for your attention. Please feel free to ask any questions you have about this issue.