<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Yes, it only works correctly as a filter layer. It also doesn't work correctly as a Filter Mask.<br><br>I'm adding the transaction just before performing the convolution.<br>Regarding the patch, I'm attaching the latest revision.<br><br>There is no particular hurry. Good luck for your exam.<br><br><hr id="stopSpelling">Date: Tue, 22 Dec 2009 17:58:24 +0300<br>Subject: Re: Consecutive Convolutions<br>From: dimula73@gmail.com<br>To: kimageshop@kde.org<br><br>Hmm, strange...<br>The problem is surely with some transactions stuff...<br>I'm having an exam tomorrow, so I'll be able to check this only tomorrow evening.<br><br>Do you mean that Filter Layer applies correctly, but Filter dialog not?<br>
<br>Could you check whether "Filter Mask" works (as Filter dialog used to use the one internally)?<br><br>And which function do you add these lines to? (i guess i have to apply your patch first)<br><br><br><div class="ecxgmail_quote">
On Tue, Dec 22, 2009 at 5:45 PM, Ed . <span dir="ltr">&lt;<a href="mailto:schumifer@hotmail.com">schumifer@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="ecxgmail_quote" style="padding-left: 1ex;">




<div>
Adding a transaction for the src had no positive effect. Moreover, adding it causes the filter to work incorrectly as a filter layer (only 2nd convolution is computed).<br><br><hr>Date: Tue, 22 Dec 2009 17:34:05 +0300<div>
<div></div><div class="h5"><br>Subject: Re: Consecutive Convolutions<br>From: <a href="mailto:dimula73@gmail.com">dimula73@gmail.com</a><br>To: <a href="mailto:kimageshop@kde.org">kimageshop@kde.org</a><br>
<br>Hm.. stack is not needed actually.<br><br>Add for the source:<br>KisTransaction *t0 = new KisTransaction("", src);<br><br><div>On Tue, Dec 22, 2009 at 5:29 PM, Ed . <span dir="ltr">&lt;<a href="mailto:schumifer@hotmail.com">schumifer@hotmail.com</a>&gt;</span> wrote:<br>

<blockquote style="padding-left: 1ex;">



<div>
<br>Do you mean, like so?<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QUndoStack stack;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; KisTransaction *t1 = new KisTransaction("", interm);<div><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; KisConvolutionPainter horizPainter(interm, dstInfo.selection());<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; horizPainter.applyMatrix(kernelHoriz, src, srcTopLeft, srcTopLeft, size, BORDER_REPEAT);<br></div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stack.push(t1);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; KisTransaction *t2 = new KisTransaction("", dst);<div><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; KisConvolutionPainter verticalPainter(dst, dstInfo.selection());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; verticalPainter.applyMatrix(kernelVertical, interm, srcTopLeft, dstTopLeft, size, BORDER_REPEAT);<br></div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stack.push(t2);<br><br>

This had no effect whatsoever.<br><br><hr>Date: Tue, 22 Dec 2009 17:05:21 +0300<br>Subject: Re: Consecutive Convolutions<br>From: <a href="mailto:dimula73@gmail.com">dimula73@gmail.com</a><br>To: <a href="mailto:kimageshop@kde.org">kimageshop@kde.org</a><div>

<div></div><div><br><br>Could you try to create transactions for both devices? Directly or using KisPainter's method. Filters rely on oldData feature but this do not work without a transaction created.<br><br>
<div>On Tue, Dec 22, 2009 at 4:57 PM, Ed . <span dir="ltr">&lt;<a href="mailto:schumifer@hotmail.com">schumifer@hotmail.com</a>&gt;</span> wrote:<br>
<blockquote style="padding-left: 1ex;">



<div>
Hi,<br><br>I am performing two consecutive convolution operations, one after each other in a filter (the Gaussian Blur filter in the review board). Of course, I need a temporary buffer to do this. Below is what I'm doing.<br>


<br>&nbsp; KisPaintDeviceSP interm = new KisPaintDevice(*src);<br><br>&nbsp; KisConvolutionPainter horizPainter(interm, dstInfo.selection());<br>&nbsp; horizPainter.applyMatrix(kernelHoriz, src, srcTopLeft, srcTopLeft, size, BORDER_REPEAT);<br>


<br>&nbsp; KisConvolutionPainter verticalPainter(dst, dstInfo.selection());<br>&nbsp; verticalPainter.applyMatrix(kernelVertical, interm, srcTopLeft, dstTopLeft, size, BORDER_REPEAT);<br><br>The output I'm getting when I apply the rasterizing filter, is the result of the second convolution only. However, if I apply the filter as a filter layer, I get the combined result of both convolutions.<br>


<br>As boud suggested on IRC, I switched Krita to the old tile engine, and the results are correct in both cases. Therefore, the indication is that this is a problem with the new tile engine. Could anyone investigate further?<br>


                                               <br><hr>Windows Live:  <a href="http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010">Friends get your Flickr, Yelp, and Digg updates when they e-mail you.</a></div>



<br>_______________________________________________<br>
kimageshop mailing list<br>
<a href="mailto:kimageshop@kde.org">kimageshop@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kimageshop">https://mail.kde.org/mailman/listinfo/kimageshop</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Dmitry Kazakov<br>                                               <br></div></div><hr>Windows Live: Make it easier for your friends to see  <a href="http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009">what you’re up to on Facebook.</a></div>


<br>_______________________________________________<br>
kimageshop mailing list<br>
<a href="mailto:kimageshop@kde.org">kimageshop@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kimageshop">https://mail.kde.org/mailman/listinfo/kimageshop</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Dmitry Kazakov<br>                                               <br><hr>Windows Live:  <a href="http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010">Friends get your Flickr, Yelp, and Digg updates when they e-mail you.</a></div>
</div></div>
<br>_______________________________________________<br>
kimageshop mailing list<br>
<a href="mailto:kimageshop@kde.org">kimageshop@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kimageshop">https://mail.kde.org/mailman/listinfo/kimageshop</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Dmitry Kazakov<br>                                               <br /><hr />Windows Live:  <a href='http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010' target='_new'>Friends get your Flickr, Yelp, and Digg updates when they e-mail you.</a></body>
</html>