Bug 224047 - Thumbnails incorrectly rotated on certain images
Summary: Thumbnails incorrectly rotated on certain images
Status: RESOLVED WORKSFORME
Alias: None
Product: digikam
Classification: Applications
Component: Thumbs-Image (show other bugs)
Version: 1.1.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-24 15:41 UTC by Andrew Goodbody
Modified: 2016-07-07 21:50 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.8.0


Attachments
Screen grab showing bug for me (407.30 KB, image/png)
2010-03-04 00:10 UTC, Andrew Goodbody
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Goodbody 2010-01-24 15:41:26 UTC
Version:           1.1.0 (using Devel)
Compiler:          mingw4 
OS:                MS Windows
Installed from:    Compiled sources

When I take a picture on my Nikon S6 in portrait orientation then the thumbnail shown in digikam is rotated with respect to the actual image.
See http://www.elfringham.co.uk/DSCN1470_orig.JPG and http://www.elfringham.co.uk/DSCN1470.JPG

The _orig file has the image in landscape, yet the thumbnail shows up as portrait. The other file has the image in portrait yet the thumbnail shows up as landscape.
Comment 1 Johannes Wienke 2010-01-24 15:57:27 UTC
I would really argue we should not depend on the kipi plugin for rotation but instead use the lossless exif tag rotation whenever possible. This would prevent a lot of these errors.
Comment 2 Marcel Wiesweg 2010-02-27 17:55:13 UTC
I guess that the candlestick on the photo was upright in reality.
In _orig, the actual image (pixels on disk) are written in landscape mode. The Nikon has a sensor and wrote the correct Exif orientation tag. Digikam will rotate the image accordingly and show it correctly.

Now apparently, the second image was rotated with some tool so that the pixels on disk changed were rearranged to portrait mode. At the same time, the Exif tag was not reset, which means the image as shown by digikam is probably rotated twice.

Now, with which tool did you rotate the image? Or what is the supposed bug here?
Comment 3 Andrew Goodbody 2010-02-28 14:22:55 UTC
The bug is that in Album view, the thumbnail is shown rotated according to the EXIF orientation flag, however if I double click the thumbnail to open the Full Size Preview then the image is shown not rotated.
So just looking at the _orig file, in the Album view I see the candlestick upright so the thumbnail has been rotated correctly. However in Full Size Preview, the image has not been rotated and I see the candlestick with the top on the left.
Comment 4 Marcel Wiesweg 2010-03-03 18:38:34 UTC
I can reproduce this: In icon view, click to view preview. Close again, the click to open editor. Now in editor, the image is exif-rotated one additional time.
Comment 5 Marcel Wiesweg 2010-03-03 18:51:01 UTC
SVN commit 1098429 by mwiesweg:

Do not exif-rotate a second time in editor - previews are rotated in the cache,
and in the case of full-size preview of a JPEG, this data will be reused
for the image editor.

CCBUG: 228869

 M  +6 -1      dimginterface.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1098429
Comment 6 Marcel Wiesweg 2010-03-03 18:57:49 UTC
This is fixed. More I cannot reproduce currently, especially the preview was always correct for me. Anyone confirming?
Comment 7 Andrew Goodbody 2010-03-04 00:10:48 UTC
Created attachment 41305 [details]
Screen grab showing bug for me

Here is a screen grab showing the bug for me. I just updated to HEAD and rebuilt digikam before doing this.
Comment 8 Marcel Wiesweg 2010-04-19 20:37:26 UTC
I have now re-downloaded the DSCN1470_orig.JPG from the link above, regenerated the thumbnail and viewed the full-sized preview. Still, the candlestick is upright for me, I cannot reproduce the problem.

Can someone else try as well on Windows and Linux?
Comment 9 Jens Mueller 2010-04-19 22:29:16 UTC
For me also DSCN1470_orig.JPG thumb is shoing in portrait mode. The thumb from DSCN1470.JPG is showing in landscape mode. Verified on Linux/Kubuntu.

Jens
Comment 10 Andrew Goodbody 2010-09-30 23:34:18 UTC
OK I just upgraded to svnHEAD and found the tick box for 'Show images/thumbnails rotated according to orientation tag' was not ticked. Selecting this and the behaviour is now correct. I guess I just missed this before, but I am not sure that the behaviour was correct for the non-ticked state even so.
Comment 11 Marcel Wiesweg 2011-01-21 14:32:19 UTC
Exif rotation defaults to true in any case now. Closing as worksforyou.