Patch for KCurve and KisPerChannelFilter

Boudewijn Rempt boud at valdyas.org
Sun Feb 22 13:10:30 CET 2009


On Friday 20 February 2009, Дима Казаков wrote:

> I haven't looked throught the code, but i have such a feeling that preview
> is made against the whole unscaled image, isn't it?

Yes, it is. Well, actually, the problem is that we filter a layer in the layer 
stack, not the final image. So we cannot take the projection and filter that 
(we could do that, as an optimization, in the case where there's only one 
layer), but have to filter the layer, recomposite and redisplay.

We don't have something like a pyramid representation of layers (yet) where we 
could filter at the zoom level nearest to the actual zoom level. That would be 
one solution, sort of.

What is present, but isn't used atm (because there was a big problem and I 
have to redesign this class), is setting a region of interest on the 
projection; this would mean that for preview, only the visible part of an 
image is filtered, recomposited and redisplayed.

> I think it would be
> enough to apply filters to the smaller scaled down picture that is shown on
> the screen. Of course, there would be some mathematical issues, especially
> with convolution filters, but we could make interface that would allow
> Filter to choose whether it needs whole image for preview. imho.
>
> PS:
> Even with Curves filter there would be issues with interpolation if we use
> scaled preview. But if my memory serves me right and feelings don't lie,
> Photoshop works like that. At least preview and final results differ a bit.

We did that in the preview widget in Krita 1.6 and never stopped getting 
complaints about it -- filtering only a smaller, scaled down picture of the 
layer.

-- 
Boudewijn Rempt | http://www.valdyas.org


More information about the kimageshop mailing list