[Digikam-devel] [Bug 125916] Problem with opening 16bit TIFF

Gilles Caulier caulier.gilles at free.fr
Fri Apr 21 12:07:57 BST 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=125916         




------- Additional Comments From caulier.gilles free fr  2006-04-21 13:07 -------
SVN commit 532147 by cgilles:

digikam from stable : Fix broken thumbnail creation with USM camera with 16 bits TIFF images unrecognized properly by dcraw::parse method like a real tiff images.
CCBUGS: 125916
CCMAIL: digikam-devel kde org

 M  +15 -5     umscamera.cpp  


--- branches/stable/extragear/graphics/digikam/utilities/cameragui/umscamera.cpp #532146:532147
 @ -5,7 +5,7  @
  * Description : 
  * 
  * Copyright 2004-2005 by Renchi Raju
- * Copyright 2005 by Gilles Caulier
+ * Copyright 2005-2006 by Gilles Caulier
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General
 @ -138,9 +138,7  @
     return true;
 }
 
-bool UMSCamera::getThumbnail(const QString& folder,
-                             const QString& itemName,
-                             QImage& thumbnail)
+bool UMSCamera::getThumbnail(const QString& folder, const QString& itemName, QImage& thumbnail)
 {
     m_cancel = false;
 
 @ -173,8 +171,20  @
            return true;
     }   
 
-    // In 3rd we trying to get thumbnail from RAW files using dcraw parse utility.
+    // In 3rd, if file image type is TIFF, load thumb using KDELib API before to use dcraw::parse method 
+    // to prevent broken 16 bits TIFF thumb.
 
+    if (fi.extension().upper() == QString("TIFF") ||
+        fi.extension().upper() == QString("TIF"))
+    {
+        thumbnail.load(folder + "/" + itemName);
+    
+        if (!thumbnail.isNull())
+            return true;
+    }
+
+    // In 4th we trying to get thumbnail from RAW files using dcraw parse utility.
+
     KTempFile thumbFile(QString::null, "camerarawthumb");
     thumbFile.setAutoDelete(true);
     Digikam::DcrawParse rawFileParser;



More information about the Digikam-devel mailing list