koffice/krita/image/filter

Cyrille Berger cberger at cberger.net
Thu May 6 11:26:35 CEST 2010


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.

-- 
Cyrille Berger


More information about the kimageshop mailing list