<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hi,<BR><BR><BR>I'll reply back regarding the PNG issue when I arrive home.<BR><BR><BR>Regarding the second issue, I know about it. I'm not entirely sure it is caused by the second convolution. <BR>Try this out:<BR>Use the new motion blur filter with a large Length value and Angle set 90 degrees. You will see the border effect, but as you decrease the angle, the border effect starts vanishing. The motion blur filter only performs a single convolution.<BR><BR><HR id="stopSpelling">Date: Mon, 3 May 2010 10:28:06 +0400<BR>Subject: Gaussian filter bounds problems<BR>From: dimula73@gmail.com<BR>To: schumifer@hotmail.com<BR>CC: kimageshop@kde.org<BR><BR>Hi, Edward!<BR><BR>I tried to reproduce the bug with png image bounds today and i failed. Everything seems to work with Blur and Gaussian Blur filters added as masks and adjustment layers. Could you describe how to reproduce it here?<BR>
<BR><BR>Btw, i found a bug in Gaussian Blur filter. Try to apply it to an image that is bigger than 512x512 pixels. You get a border effect.<BR>The cause is this code, i think:<BR><SPAN style="font-family:courier new,monospace"> if ( (horizontalRadius > 0) && (verticalRadius > 0) )</SPAN><BR style="font-family:courier new,monospace">
<SPAN style="font-family:courier new,monospace"> {</SPAN><BR style="font-family:courier new,monospace"><SPAN style="font-family:courier new,monospace"> KisPaintDeviceSP interm = new KisPaintDevice(src->colorSpace());</SPAN><BR style="font-family:courier new,monospace">
<BR style="font-family:courier new,monospace"><SPAN style="font-family:courier new,monospace"> KisConvolutionKernelSP kernelHoriz = KisConvolutionKernel::fromMatrix(horizGaussian, 0, horizGaussian.sum());</SPAN><BR style="font-family:courier new,monospace">
<SPAN style="font-family:courier new,monospace"> KisConvolutionKernelSP kernelVertical = KisConvolutionKernel::fromMatrix(verticalGaussian, 0, verticalGaussian.sum());</SPAN><BR style="font-family:courier new,monospace">
<BR style="font-family:courier new,monospace"><SPAN style="font-family:courier new,monospace"> KisConvolutionPainter horizPainter(interm, dstInfo.selection());</SPAN><BR style="font-family:courier new,monospace">
<SPAN style="font-family:courier new,monospace"> horizPainter.setChannelFlags(channelFlags);</SPAN><BR style="font-family:courier new,monospace"><SPAN style="font-family:courier new,monospace"> horizPainter.setProgress(progressUpdater);</SPAN><BR style="font-family:courier new,monospace">
<SPAN style="font-family:courier new,monospace"> horizPainter.applyMatrix(kernelHoriz, src, srcTopLeft, srcTopLeft, size, BORDER_REPEAT);</SPAN><BR style="font-family:courier new,monospace"><BR style="font-family:courier new,monospace">
<SPAN style="font-family:courier new,monospace"> KisConvolutionPainter verticalPainter(dst, dstInfo.selection());</SPAN><BR style="font-family:courier new,monospace"><SPAN style="font-family:courier new,monospace"> verticalPainter.setChannelFlags(channelFlags);</SPAN><BR style="font-family:courier new,monospace">
<SPAN style="font-family:courier new,monospace"> verticalPainter.setProgress(progressUpdater);</SPAN><BR style="font-family:courier new,monospace"><SPAN style="font-family:courier new,monospace"> verticalPainter.applyMatrix(kernelVertical, interm, srcTopLeft, dstTopLeft, size, BORDER_REPEAT);</SPAN><BR style="font-family:courier new,monospace">
<SPAN style="font-family:courier new,monospace"> }<BR><BR>The problem is, when you convolve the second time, there is no needRect prepared for the convolution. src device has this additional data (it is prepared by walkers), while interm doesn't. I see the only way out in bitBlt'ing src into interm, but this will be very inefficient. Or writing a special RepeatIteratorFactory that might be too complex task...<BR>
<BR><BR style="font-family:courier new,monospace" clear="all"></SPAN><BR>-- <BR>Dmitry Kazakov<BR>                                            <br /><hr />Hotmail: Trusted email with Microsoft’s powerful SPAM protection. <a href='https://signup.live.com/signup.aspx?id=60969' target='_new'>Sign up now.</a></body>
</html>