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

List:       kde-kimageshop
Subject:    Re: koffice/krita/image
From:       Dmitry Kazakov <dimula73 () gmail ! com>
Date:       2010-10-03 7:12:28
Message-ID: AANLkTim=htT9ma-SgT5WSD1LnaUBDuaZxPAzeuF=fhvr () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Sun, Oct 3, 2010 at 10:45 AM, Cyrille Berger <> wrote:

> SVN commit 1182049 by berger:
>
> Fix: merging of layers with a different color space than their group layer
>
> BUG:247037
>
>
>  M  +1 -1      kis_image.cc
>
>
> --- trunk/koffice/krita/image/kis_image.cc #1182048:1182049
> @@ -708,7 +708,7 @@
>
>     KisPainter gc(mergedDevice);
>     gc.setChannelFlags(layer->channelFlags());
> -    gc.setCompositeOp(layer->compositeOp());
> +
>  gc.setCompositeOp(layer->colorSpace()->compositeOp(layer->compositeOp()->id()));
>     gc.setOpacity(layer->opacity());
>     gc.bitBlt(layerExtent.topLeft(), layer->projection(), layerExtent);
>


I think it would be much more obvious and safe to use:

gc.setCompositeOp(mergedDevice->colorSpace()->compositeOp(layer->compositeOpId()));

Especially, taking into account the fact, that colorspaces of the
mergedDevice and the layer may easily not coincide.


-- 
Dmitry Kazakov

[Attachment #5 (text/html)]

<div class="gmail_quote">On Sun, Oct 3, 2010 at 10:45 AM, Cyrille Berger <span \
dir="ltr">&lt;&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: \
0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> \
SVN commit 1182049 by berger:<br> <br>
Fix: merging of layers with a different color space than their group layer<br>
<br>
BUG:247037<br>
<br>
<br>
  M   +1 -1         kis_image.cc<br>
<br>
<br>
--- trunk/koffice/krita/image/kis_image.cc #1182048:1182049<br>
@@ -708,7 +708,7 @@<br>
<br>
       KisPainter gc(mergedDevice);<br>
       gc.setChannelFlags(layer-&gt;channelFlags());<br>
-      gc.setCompositeOp(layer-&gt;compositeOp());<br>
+      gc.setCompositeOp(layer-&gt;colorSpace()-&gt;compositeOp(layer-&gt;compositeOp()-&gt;id()));<br>
  gc.setOpacity(layer-&gt;opacity());<br>
       gc.bitBlt(layerExtent.topLeft(), layer-&gt;projection(), layerExtent);<br>
</blockquote></div><br><br>I think it would be much more obvious and safe to \
use:<br><br>gc.setCompositeOp(mergedDevice-&gt;colorSpace()-&gt;compositeOp(layer-&gt;compositeOpId()));<br><br>Especially, \
taking into account the fact, that colorspaces of the mergedDevice and the layer may \
easily not coincide.<br> <br clear="all"><br>-- <br>Dmitry Kazakov<br>



_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop


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

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