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

List:       kde-kimageshop
Subject:    Re: koffice/krita/image/filter
From:       Dmitry Kazakov <dimula73 () gmail ! com>
Date:       2010-05-06 9:40:30
Message-ID: t2lae32c1ef1005060240t2c06dbd0z8a5480b13635c2f () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Thu, May 6, 2010 at 1:26 PM, Cyrille Berger <cberger@cberger.net> wrote:

> Lets try to keep it on the list :) Since it is a very interesting subject
> ;)
>
> On Thursday 06 May 2010, you wrote:
> > Yeah, good point...
> > In the beginning i thought it should look like
> > QPainter::CompositionMode_Source. But in such a case we will clear all
> the
> > image outside the selection...
> >
> > I guess, a testcase for a bug is:
> >
> > Imagine that one of the filter's tasks is to make a circle of
> transparency
> > in the center of the image. It's selection is rectangular.
> >
> > The expected result of direct application of this filter to the image is:
> > - all the pixles of the rectangle are filtered (e.g. some brightness)
> > - in the center of the image there is a transparent circular hole
> >
> > If we use COMPOSITE_OVER we would get the following:
> > - all the pixels of the rectangle are filtered
> > - BUT we see the source image instead of a transparent hole in the center
>
> Hum indeed, that would break the color-to-alpha filter. So what we need is
> a
> composite op that do like COMPOSITE_OVER for color channels but copy the
> ALPHA
> channel of the filter result into the destination.
>

Argh.. Gmail doesn't add the CC's when replying.

Btw, don't all the composites should be fixed then?

I think the composition should look like with two stages:
1) we blend two devices, not counting any selections and write in to the
temporary device
2) then we blend the result into the destination device using the selection
value as an alpha channel for temporary device. At this stage the original
alpha channel of the temporary device will be dealt as a regular channel.


-- 
Dmitry Kazakov

[Attachment #5 (text/html)]

<br><br><div class="gmail_quote">On Thu, May 6, 2010 at 1:26 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="margin: 0pt 0pt 0pt 0.8ex; \
border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> Lets try to keep it \
on the list :) Since it is a very interesting subject ;)<br> <div class="im"><br>
On Thursday 06 May 2010, you wrote:<br>
</div><div class="im">&gt; Yeah, good point...<br>
&gt; In the beginning i thought it should look like<br>
&gt; QPainter::CompositionMode_Source. But in such a case we will clear all the<br>
&gt; image outside the selection...<br>
&gt;<br>
&gt; I guess, a testcase for a bug is:<br>
&gt;<br>
&gt; Imagine that one of the filter&#39;s tasks is to make a circle of \
transparency<br> &gt; in the center of the image. It&#39;s selection is \
rectangular.<br> &gt;<br>
&gt; The expected result of direct application of this filter to the image is:<br>
&gt; - all the pixles of the rectangle are filtered (e.g. some brightness)<br>
&gt; - in the center of the image there is a transparent circular hole<br>
&gt;<br>
&gt; If we use COMPOSITE_OVER we would get the following:<br>
&gt; - all the pixels of the rectangle are filtered<br>
&gt; - BUT we see the source image instead of a transparent hole in the center<br>
<br>
</div>Hum indeed, that would break the color-to-alpha filter. So what we need is \
a<br> composite op that do like COMPOSITE_OVER for color channels but copy the \
ALPHA<br> channel of the filter result into the \
destination.<br></blockquote><div><br>Argh.. Gmail doesn&#39;t add the CC&#39;s when \
replying.<br><br>Btw, don&#39;t all the composites should be fixed then?<br><br>I \
think the composition should look like with two stages:<br> 1) we blend two devices, \
not counting any selections and write in to the temporary device<br>2) then we blend \
the result into the destination device using the selection value as an alpha channel \
for temporary device. At this stage the original alpha channel of the temporary \
device will be dealt as a regular channel.<br> <br><br></div></div>-- <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