koffice/krita/image/filter
Dmitry Kazakov
dimula73 at gmail.com
Thu May 6 11:40:30 CEST 2010
On Thu, May 6, 2010 at 1:26 PM, Cyrille Berger <cberger at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20100506/f682bd69/attachment-0001.htm
More information about the kimageshop
mailing list