Change image size & transform tool

Casper Boemann cbr at boemann.dk
Thu Jun 23 16:17:31 CEST 2005


On Thursday 23 June 2005 13:55, Michael Thaler wrote:
> On Thursday 23 June 2005 13:09, Casper Boemann wrote:
> > Not really, no. It's basically just the scaling with an offset.
>
> As far as I remember, rotating can be done by a 3-pass shearing algorithm
> and that is, what the rotation code in Krita is doing right now. 
Yes and what I intend to do with the transform tool once I get around to it.
2 passes are actually enough, but with 3 passes you gain better results.

And Boundewijn have been so nice as to implement 90  and 180 degree rotation 
functions just to my liking so I can use them directly.

> If you 
> shift a line by a non-integer value, you of course have to interpolate. You
> could indeed use filters to do this interpolation, which would probably
> improve the result.
Even when not shifting by an integer the dst pixel should actually have 
contributions from more than one src pixel.

> > I intend to use the filters from you code. In fact I've already copied
> > them.
>
> Yes, I saw that. I should backport your improvements, I think.
I was thinking that they maybe should be plugins?
ah well one step at a time.
I want to convert them to integer. Or rather: let them support an integer 
version as well.

> Maybe it is a good idea to rewrite my scaling code, anyway, and make it use
> the iterators directly? In this way I would get comfortable with the whole
> scaling business again and if it actually works out, Krita would immedialty
> pbenefit from it. It would also be interesting how much the precalculations
> speed things up. After that we could still decide if we drop the scaling
> code and use the one from the transform visitor that also does rotating and
> shearing or if we want to have seperate visitors.
Sure please do. If nothing else it gives us insight.

Are you still coming to the krita hackathon?
-- 
best regards / venlig hilsen
Casper Boemann


More information about the kimageshop mailing list