[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: RE: Consecutive Convolutions
From: "Ed ." <schumifer () hotmail ! com>
Date: 2009-12-27 18:35:54
Message-ID: BAY112-W12C409EF69F8348DCB8A4FB77C0 () phx ! gbl
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Could you elaborate what you are doing to crash Krita when painting on the mask?
Date: Sun, 27 Dec 2009 14:08:02 +0300
Subject: Re: Consecutive Convolutions
From: dimula73@gmail.com
To: kimageshop@kde.org
Well, i seem to have fixed this. Please update.
There are some crashes when you paint on the mask, i'm investigating this.
A couple of comments about the pacth:
1) There is no need to make a copy of a source device as convolution will do this for \
you one more time. I mean first line should be:
KisPaintDeviceSP interm = new KisPaintDevice(src->colorSpace());
2) Shared pointers shouldn't be delete'ed. This may cause a crash =)
Final working version of the 'if':
if ( (horizontalRadius > 0) && (verticalRadius > 0) )
{
KisPaintDeviceSP interm = new KisPaintDevice(src->colorSpace());
KisConvolutionKernelSP kernelHoriz = \
KisConvolutionKernel::fromMatrix(horizGaussian, 0, horizGaussian.sum());
KisConvolutionKernelSP kernelVertical = \
KisConvolutionKernel::fromMatrix(verticalGaussian, 0, verticalGaussian.sum());
KisConvolutionPainter horizPainter(interm, dstInfo.selection());
horizPainter.applyMatrix(kernelHoriz, src, srcTopLeft, srcTopLeft, size, \
BORDER_REPEAT);
KisConvolutionPainter verticalPainter(dst, dstInfo.selection());
verticalPainter.applyMatrix(kernelVertical, interm, srcTopLeft, dstTopLeft, \
size, BORDER_REPEAT);
}
--
Dmitry Kazakov
_________________________________________________________________
Windows Live Hotmail: Your friends can get your Facebook updates, right from \
HotmailŪ. 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_4:092009
[Attachment #5 (text/html)]
<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Could you elaborate what you are doing to crash Krita when painting on the \
mask?<br><br><hr id="stopSpelling">Date: Sun, 27 Dec 2009 14:08:02 +0300<br>Subject: \
Re: Consecutive Convolutions<br>From: dimula73@gmail.com<br>To: \
kimageshop@kde.org<br><br>Well, i seem to have fixed this. Please \
update.<br><br>There are some crashes when you paint on the mask, i'm investigating \
this.<br><br><br>A couple of comments about the pacth:<br>1) There is no need to make \
a copy of a source device as convolution will do this for you one more time. I mean \
first line should be:<br> KisPaintDeviceSP interm = new \
KisPaintDevice(src->colorSpace());<br><br>2) Shared pointers shouldn't be \
delete'ed. This may cause a crash =)<br><br clear="all">Final working version of the \
'if':<br><br> if ( (horizontalRadius > 0) && (verticalRadius > 0) \
)<br> {<br> \
KisPaintDeviceSP interm = new \
KisPaintDevice(src->colorSpace());<br><br> \
KisConvolutionKernelSP kernelHoriz = KisConvolutionKernel::fromMatrix(horizGaussian, \
0, horizGaussian.sum());<br> \
KisConvolutionKernelSP kernelVertical = \
KisConvolutionKernel::fromMatrix(verticalGaussian, 0, \
verticalGaussian.sum());<br><br> \
KisConvolutionPainter horizPainter(interm, \
dstInfo.selection());<br> \
horizPainter.applyMatrix(kernelHoriz, src, srcTopLeft, srcTopLeft, size, \
BORDER_REPEAT);<br> <br> \
KisConvolutionPainter verticalPainter(dst, \
dstInfo.selection());<br> \
verticalPainter.applyMatrix(kernelVertical, interm, srcTopLeft, dstTopLeft, size, \
BORDER_REPEAT);<br><br> }<br><br><br>-- <br>Dmitry Kazakov<br> \
<br /><hr />Windows Live Hotmail: <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_4:092009' \
target='_new'>Your friends can get your Facebook updates, right from \
HotmailŪ.</a></body> </html>
_______________________________________________
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