[Kde-imaging] [Bug 103282] no exif-rotation in slideshow

Renchi Raju renchi at pooh.tam.uiuc.edu
Tue Apr 5 19:50:18 CEST 2005


------- 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=103282         




------- Additional Comments From renchi pooh tam uiuc edu  2005-04-05 19:50 -------
CVS commit by pahlibar: 



if user wants exif rotated image, he will get exif rotated image (in kipi as
well)
CCBUGS: 103282


  M +24 -1     kipiinterface.cpp   1.20


--- kdeextragear-3/digikam/digikam/kipiinterface.cpp  #1.19:1.20
 @ -52,4 +52,5  @ extern "C"
 
 #include <libkexif/kexifutils.h>
+#include <libkexif/kexifdata.h>
 
 // Local includes.
 @ -211,5 +212,27  @ void DigikamImageInfo::addAttributes( co
 int DigikamImageInfo::angle()
 {
-    // TODO ! This will a libKExif implementation call ?
+    AlbumSettings *settings = AlbumSettings::instance();
+    if (settings->getExifRotate())
+    {
+        KExifData exifData;
+        
+        if (exifData.readFromFile(_url.path()))
+        {
+            KExifData::ImageOrientation orientation = exifData.getImageOrientation();
+
+            switch (orientation) {
+            case KExifData::ROT_180:
+                return 180;
+            case KExifData::ROT_90:
+            case KExifData::ROT_90_HFLIP:
+            case KExifData::ROT_90_VFLIP:
+                return 90;
+            case KExifData::ROT_270:
+                return 270;
+            default:
+                return 0;
+            }
+        }
+    }
     
     return 0;


More information about the Kde-imaging mailing list