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

List:       kde-kimageshop
Subject:    Re: Yet another bug. This time filters vs selections
From:       Dmitry Kazakov <dimula73 () gmail ! com>
Date:       2009-09-14 8:48:51
Message-ID: ae32c1ef0909140148m1f753456y497838d562cb0fa8 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Mon, Sep 14, 2009 at 12:19 PM, Cyrille Berger <cberger@cberger.net>wrote:

> On Sunday 13 September 2009, Dmitry Kazakov wrote:
> > Btw, Blur filter doen NOT pay any attention to selections. And i do not
> > know the way how can it do that. =(
> it's probably just a matter to give the iterrators the selection object.
>

It won't solve the problem of semi-selected pixels (pixels with alpha~128).
Such pixels should be filtered with cs->applyAlphaU8Mask() separately. I
think it'll be quite complex solution for blur filter.


Atm, i insist on using bitBlt after the filtering. This will make filter
creation much simplier, especially for filters that are quite complex
themselves (like convolution). My tests show the following overhead:

when 28% of the canvas is deselected we get only 2% overhead
when 53% of the canvas is deselected we get only 13% overhead
(i got these numbers with brightness/contrast filter)

More that that, there are some ways to optimize bitBlt in feature, like
create a loop that checks upcoming pixels for isSelected().



PS:
Btw, Qt uses PrecomputedARGB for some complex operations. Can't we use
something like that for selections?

-- 
Dmitry Kazakov

[Attachment #5 (text/html)]

<div class="gmail_quote">On Mon, Sep 14, 2009 at 12:19 PM, Cyrille Berger <span \
dir="ltr">&lt;<a href="mailto:cberger@cberger.net">cberger@cberger.net</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div style="font-family: \
&#39;DejaVu Sans&#39;; font-size: 9pt; font-weight: 400; font-style: normal;"><div \
class="im">On Sunday 13 September 2009, Dmitry Kazakov wrote:<br></div><div \
class="im"> &gt; Btw, Blur filter doen NOT pay any attention to selections. And i do \
not<br> &gt; know the way how can it do that. =(<br></div>
it&#39;s probably just a matter to give the iterrators the selection \
object.<br></div></blockquote><div><br>It won&#39;t solve the problem of \
semi-selected pixels (pixels with alpha~128). Such pixels should be filtered with \
cs-&gt;applyAlphaU8Mask() separately. I think it&#39;ll be quite complex solution for \
blur filter.<br> <br><br>Atm, i insist on using bitBlt after the filtering. This will \
make filter creation much simplier, especially for filters that are quite complex \
themselves (like convolution). My tests show the following overhead:<br> <br>when 28% \
of the canvas is  deselected we get only 2% overhead<br>when 53% of the canvas is  \
deselected we get only 13% overhead<br>(i got these numbers with brightness/contrast \
filter)<br><br>More that that, there are some ways to optimize bitBlt in feature, \
like create a loop that checks upcoming pixels for isSelected().<br> \
<br><br><br>PS:<br>Btw, Qt uses PrecomputedARGB for some complex operations. \
Can&#39;t we use something like that for selections?<br></div></div><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