Created attachment 76166 [details] after rotation in showfoto, photo is incorrect in preview and in konqueror After the upgrade to showfoto 2.9.0, my portrait mode photos are shown rotated in the main view and correct in the preview pane. When I rotate the photos manually, they are shown correctly in the main view, but rotated in the preview pane. When I then save them, they are shown rotated in konqueror thumbnail preview and in gwenview. See attachment. I tried to change the behavior by toggling the application setting metadata/ Rotate according to exif data, but to no avail.
Same her with 2.8.0 from kubuntu 12.10. No problems in digikam editor.
(In reply to comment #1) > Same her with 2.8.0 from kubuntu 12.10. > No problems in digikam editor. And also in 2.6.0 (Debian 2.6.0-1+b2).
(In reply to comment #2) > (In reply to comment #1) > > Same her with 2.8.0 from kubuntu 12.10. > > No problems in digikam editor. > > And also in 2.6.0 (Debian 2.6.0-1+b2). as well as in 3.0.0 (Ubuntu Beta) :-( Any idea when the error occurred the first time? (irc 1.9 was OK).
Exiv2 shared lib is used here to get image orientation from image metadata. Gilles Caulier
(In reply to comment #4) > Exiv2 shared lib is used here to get image orientation from image metadata. > > Gilles Caulier running exiv2 on a portrait jpeg gives $ exiv2 -pv e2224516.jpg | grep Orientation 0x0112 Image Orientation Short 1 6 (image _is_ rotated 90 degrees) In the thumb bar the preview is shown correctly but in the edit area the image is rotated to the left. If I change the orientation by issuing $ exiv2 -M"set Exif.Image.Orientation 1" e2224516.jpg the image is shown in both the thumb bar and the edit area rotated to the left. So it seems the exif information is evaluated correctly only for the preview.
The slide show is shown correctly; so it seems that the exifOrientation information is not applied to the editor window.
So I played a bit with a debugger and found: - creation of thumbnails: exif orientation is queried and used - slideshow: exif orientation is queried and used - called from digikam (tools->editor): exif orientation is queried (from db) and used - called standalone (with filename, thumbbar hidden): exif info is not queried, orientation is always ignored...
There is an option in Shwofoto Settings pannel, into Metadata/Behavior section. It's turned on ? Gilles Caulier
(In reply to comment #8) > There is an option in Shwofoto Settings pannel, into Metadata/Behavior > section. It's turned on ? > > Gilles Caulier I've tried both settings (on/off); it makes no difference (see also Achim's post #1, last line). Because debugging a unknown, mutlithreaded C++ application is a pain, I stopped for the moment. It looks like there's a point in loadsavethread and related methods where a decision is made whether to query exif infos or not (e. g. do we have db infos? Which preview description type etc), If we find the version when this behavior changed (1.9 is working fine) we might get the bug. Andreas
>e. g. do we have db infos? Showfoto do not use a DB. It take Exif orientation flag info from file metadata and that all... Can you share some images which have the problem in your computer Gilles Caulier
Created attachment 77656 [details] example landscape photo
(In reply to comment #10) > >e. g. do we have db infos? > > Showfoto do not use a DB. It take Exif orientation flag info from file > metadata and that all... > > Can you share some images which have the problem in your computer > > Gilles Caulier I know that showfoto as a standalone application doesn't use a db but digikam does and if the component is called as the digikam editor information from the digikam-db is used. Called as showfoto it should read the exifs an it does so for the thumbs in the thumbbar and for the slideshow but not for the image in the main view. You'll find a landscape image attached (exif orientation 6) Andreas
Created attachment 77660 [details] a better example
(In reply to comment #9) > If we find the version when this behavior changed (1.9 is working fine) we > might get the bug. > The last version working fine is 2.5.0. The bug is present from 2.6.0beta1 on (introducing kexiv2 access?). Andreas
To localize where is the bug, please identify which library is used with digiKam 2.5.0 and 2.6.0 : - libkexiv2 - Exiv2 Gilles Caulier
(In reply to comment #15) > To localize where is the bug, please identify which library is used with > digiKam 2.5.0 and 2.6.0 : > > - libkexiv2 > - Exiv2 > > Gilles Caulier For both versions: ldd core/showfoto/showfoto | grep exiv libkexiv2.so.10 => /usr/lib/libkexiv2.so.10 (0xb7176000) libexiv2.so.12 => /usr/lib/libexiv2.so.12 (0xb3db0000) Debugging showfoto with breakpoints at LoadSaveThread::exifOrientation and LoadSaveThread::exifRotate shows: If load the file from command line with the thumbbar turned off both methods are never called. On Turning the thumbbar on the application stops at breakpoints and the thumbnail show a correct orientation while the main view stays in landscape mode. Andreas
(In reply to comment #16) > libkexiv2.so.10 => /usr/lib/libkexiv2.so.10 (0xb7176000) > libexiv2.so.12 => /usr/lib/libexiv2.so.12 (0xb3db0000) > libexiv2 from debian libexiv2-12 (0.23-1) libkexiv2 from debian libkexiv2-10 (4.8.4-1) Andreas
Looking closer I found the exifRotate property never is set since 2.6 (defaults to false). The lines in showfoto.cpp (2.5.0) which do the trick are now commented out: 562 bool exifRotate = group.readEntry("EXIF Rotate", true); 563 m_canvas->setExifOrient(exifRotate); When I reactivate these, rotated images are shown correctly (tested with git-code). Andreas
Thanks to investigate. This have been introduced by this commit from Marcel, probably by error : https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/77f7fd8a6413e326026ff86bf4bc7e98ee9c498d Code change : https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/77f7fd8a6413e326026ff86bf4bc7e98ee9c498d/diff/showfoto/main/showfoto.cpp Marcel, these lines can be uncommented safetly ? Gilles Caulier
The correct way would be to set up the MetadataSettings correctly. exifRotate = true is the default value, which means at some place in showfoto, this setting is changed, or the setup is not read correctly. We need to investigate.
Git commit f14412312d4aa8c1ab3ac75474e05cc6b723257a by Gilles Caulier. Committed on 18/03/2013 at 10:09. Pushed by cgilles into branch 'master'. Initialize MetadataSettings at showfoto startup Move canvas Exif autorotate handing in applyStandardSettings() FIXED-IN : 3.2.0 M +1 -1 showfoto/main/main.cpp M +15 -18 showfoto/main/showfoto.cpp M +1 -1 showfoto/main/showfoto.h M +9 -2 utilities/imageeditor/editor/editorwindow.cpp M +1 -1 utilities/imageeditor/editor/editorwindow.h M +1 -5 utilities/imageeditor/main/imagewindow.cpp http://commits.kde.org/digikam/f14412312d4aa8c1ab3ac75474e05cc6b723257a
Great! I manually applied this to 2.6.0beta1 ... works fine. So patching other versions with a slight jitter should be simple. Thanks Andreas