[PATCH]: fix "merge with layer below" junior job

GAURAV Agrawal gauravagrawal03jan at gmail.com
Fri Feb 14 01:17:27 UTC 2014


Hello,

The attached patch applies to the file-calligra/krita/image/kis_image.cc

This patch fixes the Bug-322951

                        https://bugs.kde.org/show_bug.cgi?id=322951.

It fixes the bug that when we try to merge two layers in which the layer
above inherits alpha and the layer below doesn't inherit alpha, it doesn't
give the desired results.

This patch will give the desired result that the final merged image will
contain the part of the layer above ,within the visible coloured part of
the layer below .There is no extra scattered part.

Thanks,

Gaurav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kimageshop/attachments/20140214/a56dbede/attachment.html>
-------------- next part --------------
--- kis_image_orig.cc	2014-02-14 06:20:59.179312710 +0530
+++ kis_image.cc	2014-02-14 06:21:50.795311185 +0530
@@ -978,7 +978,7 @@ KisLayerSP KisImage::mergeDown(KisLayerS
 
         //Paint layer on the copy
         KisPainter gc(mergedDevice);
-        layer->disableAlphaChannel(false);
+
         gc.setChannelFlags(layer->channelFlags());
         gc.setCompositeOp(mergedDevice->colorSpace()->compositeOp(layer->compositeOpId()));
         gc.setOpacity(layer->opacity());


More information about the kimageshop mailing list