[Digikam-devel] extragear/graphics/digikam/utilities/imageeditor/canvas

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] extragear/graphics/digikam/utilities/imageeditor/canvas

Gilles Caulier
SVN commit 529253 by cgilles:

digikam from trunk : patch from Paco about screen ICC color profile rules.

The implemented have been fixed about a crash generated by in DImg::convertToPixmap() witch return a null Pixmap.

The code isn't optimized : ICC color profile files are loaded from disk at each pixmap computation. better way is to load these files at Image Editor startup, store like bytes array into memory, and use it when we want.

CCMAIL: [hidden email], [hidden email]

 M  +13 -1     dimginterface.cpp  


--- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/dimginterface.cpp #529252:529253
@@ -607,8 +607,20 @@
     d->cmod.applyBCG(img);
     img.convertDepth(32);
 
-    QPixmap pix(img.convertToPixmap());
+/*    QPixmap pix(img.convertToPixmap());
     bitBlt(p, dx, dy, &pix, 0, 0);
+*/
+    if (d->cmSettings->managedViewSetting)
+    {
+        QPixmap pix(img.convertToPixmap(d->cmSettings->inputSetting,
+                                        d->cmSettings->monitorSetting));
+        bitBlt(p, dx, dy, &pix, 0, 0);
+    }
+    else
+    {
+        QPixmap pix(img.convertToPixmap());
+        bitBlt(p, dx, dy, &pix, 0, 0);
+    }
 }
 
 void DImgInterface::paintOnDevice(QPaintDevice* p,
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel