plan for merging

Michael Thaler michael.thaler at ph.tum.de
Fri Jan 7 21:44:43 CET 2005


On Friday 07 January 2005 21:26, Casper Boemann wrote:

> 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:-((

Take care,
Michael


More information about the kimageshop mailing list