plan for merging

Casper Boemann cbr at boemann.dk
Fri Jan 7 22:04:58 CET 2005


----- Original Message ----- 
From: "Michael Thaler" <michael.thaler at ph.tum.de>
> > No, not really
> >
> > I guess the right man could fix it in a couple of hours, but as I'm not
the
> > maintainer it would probaply take me a bit longer ;-)
>
> Both the rotate and the scale visitors do not use the iterators. They use
> readPixelData directly.
>
> I played a little with the iterators and tried to use them in the rotate
code
> (in the rotateRight90()) function. It worked for some images, but it
crashed
> with others. But I think it should not be too difficult to make the rotate
> code use the visitors.
>
> (Actually I think one problem is, that the iterators are slower then using
> readPixelData directly. The rotate code reads a whole line using
> readPixelData and I had the feeling that the version using the iterators
was
> slower, but I did not do any measurements. The code is still there, I just
> commented it out)
>
> The scale visitor could be a bigger problem, because I don't understand
this
> code very well. I have it from the Graphic Gems book (it is public domain)
> and just made it work with Krita. In principle I also know how it works,
but
> not every little detail of it. Especially not the precomputing stuff. To
make
> that code use iterators, basically the order of x and y have to be
> interchanged and then the readPixelData has to be replaced by iterators.
This
> is not a fundamental problem and it really should be done.
>
> (A simple fix would be, to read the whole image to a temporary buffer
using
> iterators and just change the code to work on the buffer, this should be
much
> easier and would speed up scaling a lot)
>
> So to summerize, in prinicple it should not be a problem to make
> scaling/rotations work, but I don't know if it can be done in a couple of
> hours and I don't know if I have time:-((
>

Ok I see, and readPixelData is gone, but we could do as you say and just
read into a buffer.

I'll take a closer look then. I'll try to make scale work, if thats ok with
you?

best regards
casper



More information about the kimageshop mailing list