Summary: | Slideshow screensaver doesn't rotate Canon CR2 raw files to portrait mode | ||
---|---|---|---|
Product: | [Unmaintained] kscreensaver | Reporter: | falolaf |
Component: | screensavers | Assignee: | kscreensaver bugs tracking <kscreensaver-bugs-null> |
Status: | RESOLVED INTENTIONAL | ||
Severity: | normal | CC: | caulier.gilles, mgraesslin, oliver.henshaw |
Priority: | NOR | ||
Version: | 4.9.4 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
falolaf
2012-12-06 11:27:08 UTC
Hopefully this is the right component. It's probably a problem with Exif rotation extraction tag taken from metadata by Exiv2 shared library. Which version do you use ? Which rotation flag do you see with your RAW when you use Exiv2 command line tool ? Gilles Caulier anders@yvette:~/astmp/exiv> exiv2 -V exiv2 0.23 001700 (64 bit build) anders@yvette:~/astmp/exiv> exiv2 -pt IMG_7013.CR2 | grep Orientation Exif.Image.Orientation Short 1 top, right This is on a machine running KDE 4.8.5. Is this information enough? Where is the code from this screensaver. How this tool do to load image from raw file ? how it deal with tag rotation flag ? RAW file are mess and complex to manage... Gilles Caulier Here's the code located: kdeartwork/kscreensaver/kdesavers/slideshow.cpp About row 900: exiv.rotateExifQImage(mImage, exiv.getImageOrientation()); /Anders I cannot find KDEArtWork in git repository... It still in SVN ? Gilles Caulier Oh, that I don't know! I downloaded kdeartwork source from kde.org... /Anders (In reply to comment #6) > I cannot find KDEArtWork in git repository... It still in SVN ? > > Gilles Caulier http://websvn.kde.org/trunk/KDE/kdeartwork/ Problem is in slideshow.cpp implementation. Here you try to load RAW image using QImage container. QImage do not support RAW file through Qt or KDE image loader. Canon RAW file are tiff/ep based format. QT detect TIFF and use relevant loader which is exist in KDELibs. ... But it's wrong. definitively the image loaded by this way is not the right image. To resume : RAW format are complex container with multiple image embeded, including RAW data, JPEG preview embeded, and metadata... To load RAW image preview, you need to use libkdcraw from kdegraphics (the companion of libkexiv2). This lib is also done by digiKam team. Loading RAW preview in QImage is very simple. Look code from Kipi-plugin OpenGL image viewer as example : https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/entry/imageviewer/texture.cpp#L124 Code to autorotate image based on KEXiv2 is also included in this method. It use KPImageInfo which return orientation flags from KIPI host, which is in fact Exif orientation flag... Gilles Caulier Ok, so I gave it a try but I get these errors: kscreensaver/kdesavers/slideshow.cpp: In member function ‘virtual void SlideShowSaver::loadNextImage()’: kscreensaver/kdesavers/slideshow.cpp:906:9: error: ‘KPMetadata’ has not been declared kscreensaver/kdesavers/slideshow.cpp:909:9: error: ‘loadRawPreview’ is not a member of ‘KDcrawIface::KDcraw’ Now, I'm not familiar at all with this code... Not any of it! /Anders >kscreensaver/kdesavers/slideshow.cpp:906:9: error: ‘KPMetadata’ has not been declared Replace KPMetadata by KExiv2 class. >kscreensaver/kdesavers/slideshow.cpp:909:9: error: ‘loadRawPreview’ is not a member of ‘KDcrawIface::KDcraw’ Yes, it is : https://projects.kde.org/projects/kde/kdegraphics/libs/libkdcraw/repository/revisions/master/entry/libkdcraw/kdcraw.h#L77 Do you include kdcraw.h ? You must to link too with libkdcraw at end... Gilles Caulier kscreensaver/kdesavers/slideshow.cpp: In member function ‘virtual void kSlideShowSaver::loadNextImage()’: kscreensaver/kdesavers/slideshow.cpp:906:9: error: ‘isRawFile’ is not a member of ‘KExiv2Iface::KExiv2’ kscreensaver/kdesavers/slideshow.cpp:909:9: error: ‘loadRawPreview’ is not a member of ‘KDcrawIface::KDcr There's a loadDcrawPreview function. /anders >kscreensaver/kdesavers/slideshow.cpp:906:9: error: ‘isRawFile’ is not a member of ‘KExiv2Iface::KExiv2’ Just copy this method in your code : https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/entry/common/libkipiplugins/tools/kpmetadata.cpp#L167 >kscreensaver/kdesavers/slideshow.cpp:909:9: error: ‘loadRawPreview’ is not a member of >‘KDcrawIface::KDcr >There's a loadDcrawPreview function. Use this one instead. This want mean that you use an very older release of libkdcraw. method have been renamed since a long time... Gilles Caulier I have copied and get this: In file included from /usr/include/QtCore/qdir.h:45:0, from /usr/include/QtCore/QDir:1, from kscreensaver/kdesavers/slideshow.cpp:13: /usr/include/QtCore/qstring.h: In member function ‘bool kSlideShowSaver::isRawFile(const KUrl&)’: /usr/include/QtCore/qstring.h:597:5: error: ‘QString::QString(const char*)’ is private kscreensaver/kdesavers/slideshow.cpp:934:43: error: within this context /Anders It sound like your Qt is compiled with some restrictions about point to string : http://qt-project.org/doc/qt-4.8/qstring.html#QString-8 Try one on these 3 methods instead : http://qt-project.org/doc/qt-4.8/qstring.html#fromAscii .. to replace this line : QString rawFilesExt(KDcraw::rawFiles()); by something like : QString rawFilesExt = QString::fromAscii((KDcraw::rawFiles())); Gilles Caulier The screen locker architecture changed with Plasma 5. The classic screen savers are no longer supported. The 4.x series won't see any further feature development, so this bug report won't be implemented as it doesn't apply to our current version any more. I want to thank you for your bug report and for helping improving the quality of our software and I'm sorry that we were not able to provide a fix before we retired the affected component. |