Scaling Code (was: Crop Tool)

Casper Boemann cbr at boemann.dk
Mon Mar 28 15:32:57 CEST 2005


On Monday 28 March 2005 15:21, Michael Thaler wrote:
> On Monday 28 March 2005 14:36, Boudewijn Rempt wrote:
> > I see... Undoing a crop gives funny results, too. I'm now working on
> > rotating/scaling/mirroring using the exact extent of a layer, instead of
> > the tiles extent, but I'll look at this when I've done that.
>
> Is someone working on rewriting the scaling code? I seem to remember that
> Casper mentioned that he is writing a floating point version of it. If not,
> the scaling code could be speeded up a lot by copying the image to an array
> first and scaling the array. This should not be too hard to do. In the end,
> the scaling code should use the iterators directly, but I will certainly
> not have enough time to do this before the release,
Yes I'm working on scale, rotating, translating and shearing in a single 
visitor called KisTransformVisitor which I'll commit the first version of 
quite soon.

This doesn't change the current visitors but aims to replace them all 
together. The code is based on the documents you gave me, and the current 
code, but is a totally new implementation that also uses integer math to 
speed things up.

Shearing (and thus rotating) will be visually improved as well.

Selections are respected as well.

Also it will be combined with the (nonworking) transform tool I committed some 
days ago.

For now it's mostly in my mind, though I'm able to scale and move in the x 
direction respecting selections, but not yet using filters.

It looks promising, and I think it will be feature ready by april 10th.

-- 
best regards / venlig hilsen
Casper Boemann


More information about the kimageshop mailing list