[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: kdebase/kioslave/thumbnail
From:       Nicolas Goutte <nicolasg () snafu ! de>
Date:       2003-11-01 12:29:22
[Download RAW message or body]

Two questions:
- will this work-around work too if the screen has only 256 colours?
- and what bug is worked around?

Is there another bug with Qt and PNGs apart the monochrome PNGs displayed 
colour-inversed.

If it is that bug which is worked around, then the fix should better be in 
thumbnail.cpp where the QPixmap is created from the QImage implicitely with 
QPixmap::Auto, which triggers the bug (QT issue N34247, also seen in KDE Bug 
30357.) (The reason why I think it would be better in thumbnail.cpp is that 
another thumbnail creator might return a monochrome PNG. There is perhaps not 
any know, but what in future...)

If it is not that bug but another, it would be perhaps stil time to fix it for 
KOffice 1.3, if I would know what bug it is.

Have a nice day!

--- Original Message ---
List:     kde-cvs
Subject:  kdebase/kioslave/thumbnail
From:     Stephan Kulow <coolo () kde ! org>
Date:     2003-10-31 8:40:10


CVS commit by coolo: 

adding work around for paletted PNGs (patch by Jeff Smith)
CCMAIL: 66352-done@bugs.kde.org


  M +6 -2      imagecreator.cpp   1.11


--- kdebase/kioslave/thumbnail/imagecreator.cpp  #1.10:1.11
@@ -41,5 +41,9 @@ bool ImageCreator::create(const QString 
 {
     // create image preview
-    return img.load( path );
+    if (!img.load( path ))
+        return false;
+    if (img.depth() != 32)
+        img = img.convertDepth( 32 );
+    return true;
 }
 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic