Bug 231599 - EXIF orientation in images is not honored in KSlideshow
Summary: EXIF orientation in images is not honored in KSlideshow
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Unmaintained
Component: desktop (show other bugs)
Version: unspecified
Platform: Mandriva RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-21 23:07 UTC by Daniel Mader
Modified: 2010-09-24 20:03 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Patch against trunk based on Guillaume's but improved KEXIV2 detection (1.96 KB, patch)
2010-09-23 19:59 UTC, Anne-Marie Mahfouf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Mader 2010-03-21 23:07:29 UTC
Version:           2.3.0 (using KDE 4.4.0)
OS:                Linux
Installed from:    Mandriva RPMs

The information of rotated photographs is not honored in the KSlideshow screensaver. Since this works with e.g. Gwenview and Digikam I suspect some bug here.

SlideShow
Version 2.3.0
Using KDE Development Platform 4.4.00 (KDE 4.4.0)
Comment 1 caulier.gilles 2010-03-22 09:47:28 UTC
I'm not sure if it's the right place to move this entry. Anyway, it's not digiKam problem.

Gilles Caulier
Comment 2 Guillaume Benny 2010-07-20 17:23:22 UTC
I'm not a KDE developer, but here's what I found and how to correct it.

The problem is that KSlideShow does not check at all for EXIF orientation (Exif.Image.Orientation in exiv2).

Fortunately, it's pretty easy to fix. Here's what I did with KDE 4.4.4, but I just checked and it should be the same for the latest version in subversion/git.

Here's what I modified to correct this bug:
=============================================================================
*** File: kdeartwork/kscreensaver/kdesavers/slideshow.cpp
- Add the following include (at the top of the file):
  #include <libkexiv2/kexiv2.h>

- Add the following lines at the end of the function kSlideShowSaver::loadNextImage(), for example after "if (!mImage.load()) {...}":
  KExiv2Iface::KExiv2 exiv(fname);
  exiv.rotateExifQImage(mImage, exiv.getImageOrientation());


*** File: kdeartwork/kscreensaver/kdesavers/CMakeLists.txt
- Add kexiv2 to target_link_libraries of kslideshow.kss:
  target_link_libraries(kslideshow.kss  ${KDE4_KIO_LIBS}  m  kscreensaver kexiv2)
=============================================================================

I don't know how cmake really works so there might be other things to modify to detect libkexiv2. Also, the lines that where added in slideshow.cpp may have to be within "#if" if it's supposed to be an optional dependency.

That's it. I did the modifications locally and I've tried it on about a hundred photos and it works flawlessly.
Comment 3 Beat Wolf 2010-09-21 23:42:24 UTC
could you please send this patch to a mailing list or on reviewboard.kde.org?

This is not a plasma bug, but i'm not sure against which component to fill it, so if you send the patch to the right place, it will get fixed!

thank you very much
Comment 4 Anne-Marie Mahfouf 2010-09-23 19:59:13 UTC
Created attachment 51914 [details]
Patch against trunk based on Guillaume's but improved KEXIV2 detection
Comment 5 Anne-Marie Mahfouf 2010-09-24 13:06:42 UTC
SVN commit 1179036 by annma:

allow exif rotation when libkexiv2 is present
initial patch from Guillaume Benny
thanks tsdgeop for the review
will backport to 4.5 branch
CCBUG=231599


 M  +11 -0     CMakeLists.txt  
 M  +9 -0      slideshow.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1179036
Comment 6 Anne-Marie Mahfouf 2010-09-24 20:03:23 UTC
SVN commit 1179170 by annma:

backport 1179036: allow exif rotation when libkexiv2 is present
BUG=231599


 M  +11 -0     CMakeLists.txt  
 M  +8 -0      slideshow.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1179170