Bug 347652

Summary: Gwenview double compensates for EXIF orientation tag
Product: [Applications] gwenview Reporter: Magnus Hoff <maghoff>
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: myriam, oliver.haag
Priority: NOR    
Version: 5.0.0   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
URL: http://magnushoff.com/f8t.jpg
Latest Commit: Version Fixed In:

Description Magnus Hoff 2015-05-13 08:09:59 UTC
When opening photos with the EXIF orientation tag set, the image will appear in the wrong orientation on screen.

When handling the EXIF orientation tag, software will read in and decode the JPEG image data, and then apply the appropriate transformation to show the photo in the correct orientation. In my version of Gwenview, this transformation is applied twice.

For orientation tag values 1, 2, 3, 4, 5 and 7, this results in an output image that looks exactly like the uncorrected input image; the transformation is its own inverse.

For orientation tag values 6 and 8, the image appears rotated 180 degrees from the uncorrected input image. See http://magnushoff.com/f6t.jpg and http://magnushoff.com/f8t.jpg for examples of this failure mode. They should both render as normal Fs, like this: http://magnushoff.com/f1.jpg This failure mode is the telltale sign that Gwenview applies double correction.

I think this must be a regression; I seem to remember that Gwenview has always done this correctly. Could this be the result of Qt 5 (maybe, or some other recently updated component) doing correction for the EXIF orientation tag, in addition to Gwenview doing it itself? That would result in double compensation.

For a more elaborate explanation of this whole situation, see http://magnushoff.com/jpeg-orientation.html

Reproducible: Always

Steps to Reproduce:
1. Open jpg with EXIF orientation other than 1, for example http://magnushoff.com/f8t.jpg


Actual Results:  
The image is displayed in a wrong orientation.

Expected Results:  
The image should appear in the correct orientation, as specified by the EXIF orientation tag.

Gwenview double compensates for the EXIF orientation. It should only compensate exactly once.
Comment 1 Jan Kundrát 2015-05-28 21:42:15 UTC

*** This bug has been marked as a duplicate of bug 343044 ***