Change image size & transform tool

Michael Thaler michael.thaler at ph.tum.de
Thu Jun 23 13:55:38 CEST 2005


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. 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.

> On the other hand. My code divides x and y as two distinct passes
> simplifying things a lot. Your code although also a two pass algorithm
> mixes them a bit closer.

In prinicple, my code does this, too. The only thing that mixes things up is 
the precalculations. I think if you get rid of them, they are also complete 
separated.

> 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.

> A shame, but it's on my not so distant todo list. If you change your mind
> though...

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.

But I really cannot promise to work on it, at all. I again have sleeping 
disorders and I suppose coding is not really the best thing to cure them. But 
on the other hand, I just bought Thinking in C++ on ebay (I know you can 
download it, but I hate reading online or reading sheets of papers) and I 
also want to get the Qt book from Trolltech (I know you can get this as pdf 
for free and I already printed most of it, but I prefer real books).

Michael


More information about the kimageshop mailing list