Page MenuHomePhabricator

Mirrored EXIF rotations are not applied to thumbnails
Open, LowPublic

Description

EXIF allows 8 possible values for the Orientation field: 0°, 90°, 180°, 270°, and the same four for the mirror image of the original. The last four are not used often, but are supported to some degree by the browsers. (See http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto/ for an overview of support.)

MediaWiki ignores mirrored rotations when generating thumbnails - the EXIF information is stripped, and the physical orientation is left unchanged. See [[commons:File:EXIF rotation 90 mirrored.jpg]] for an example (depending on the browser, you might need to open the image directly to see the correct position, or you might not see it at all - Chrome positions it correctly when viewed directly but not when viewed on a page).

Obviously this is Priority: No One Cares but filing it anyway for the sake of completeness.

Note that it seems that thumbor does not depend on metadata info of MediaWiki in order to do its rotation, so it should be possible to fix this relatively easily in thumbor for WMF purposes, without having to add yet another metadata aspect to the mediahandler classes.

Details

Reference
bz73602

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:53 AM
bzimport set Reference to bz73602.
bzimport added a subscriber: Unknown Object (MLST).

Here's what happens when you try images from the linked post. All images should look the same. Only 1, 3, 6 and 8 are correct.

EXIF test.png (1×631 px, 636 KB)