[Digikam-devel] [Bug 131532] New: Minolta exception code can break EXIF rotation

Sven Coenye scoenye at compaqnet.be
Sat Jul 29 23:31:32 BST 2006

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
           Summary: Minolta exception code can break EXIF rotation
           Product: digikam
           Version: 0.9.0-beta1
          Platform: Debian testing
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: digikam-devel kde org
        ReportedBy: scoenye compaqnet be

Version:           0.9.0-beta1 (using KDE KDE 3.5.0)
Installed from:    Debian testing/unstable Packages
Compiler:          gcc 3.3.5 
OS:                Linux

I could not get Digikam to honor the EXIF rotation settings and fixes in related bug reports didn't bring any relief. The problem occurs for the generation of thumbnails and when opening images. Also, I noticed the Orientation tag to be missing from the verbose metadata listing as well. Finally, I noticed "digikam: Cannot parse Exif Orientation tag using Exiv2 (Invalid key `Exif.MinoltaCs7D.Rotation')" in the console output each time I tried to open an image.

I traced this to DMetadata::getImageOrientation(). This method contains exception code to correct for an erroneous EXIF tag in Minolta's 7D and 5D cameras and tries to retrieve the regular Exif.Image.Orientation tag last. The problem is that the entire block is embedded in a try/catch statement and that at least the version of Exiv2 I use throws an exception when the first invalid key (Exif.MinoltaCs7D.Rotation) is tested. This causes getImageOrientation() to always return ORIENTATION_UNSPECIFIED.

Splitting the three tests up so each sits in its own try/catch statement and recompiling immediately fixed all the problems listed above. (I'm assuming debug logging is suspended when generating thumbnails as I don't see the exception message in the logs when Digikam rebuilds an album's thumbnails?)

Exiv2 is the Debian exiv2-0.9.1-1 collection but recompiled against libstdc++5.so. However, I can't see where the exceptions are coming from. libexiv2 seems to return the end of the iterator as expected. However, I'm not too fluent in C++, so that may explain that...

More information about the Digikam-devel mailing list