[Digikam-devel] [Bug 119946] thumbnails not correctly rotated according to exif information

Christian Krause chkr at plauener.de
Thu Feb 23 04:40:54 GMT 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=119946         




------- Additional Comments From chkr plauener de  2006-02-23 05:40 -------
I've done a small debug session and found the source of the problem:
In the file digikam-0.8.1/digikam/kioslave/exiforientation_p.h is additional implementation to read the orientation exif tag. This function returns "NORMAL" as orientation for my picture although all other exif tools reports correctly a 180 degrees rotated picture. Additional the code of this file looks a little bit ugly. It seems to be a quick hack to get the orientation flag. No constants, mostly direct numbers and hex values are used. This comments supports my feeling:

// this code is not perfect, but the probability
// that the sequence below is not
// the Orientation tag is very small.

An additional comment indicates, that this code is only temporary and there should a transition to libkexif later.

If I change the code to use libkexif directly, the orientation is correctly recognized. I think it is not worth to find the problem in this old code - a transistion to libkexif is IMHO the best solution.

I'll attach a small patch which solves the problem. My code creates a KExifData object on the stack so this should be thread safe. If creating an object for every picture is too expensive, then it's up to the KDE and C++ gurus to find a better solution.

Nevertheless, this patch works perfectly for me and I hope my patch find its way (or something similiar) to KDE's CVS, SVN or whatever... :-)

Thank you very much in advance.



More information about the Digikam-devel mailing list