Strange error
Michael Thaler
michael.thaler at ph.tum.de
Tue Jun 28 23:09:59 CEST 2005
On Tuesday 28 June 2005 22:42, Boudewijn Rempt wrote:
> Because it is declared inside the first if block -- which is not
> delimited with brackets but one block that as it were is the
> same as one statement after the if. If you declare a variable
> inside a block, it ceases to be referencable outside the block.
I am really too tired to continue to work on Krita. Obviously it is a pretty
bad idea to declare variables inside a block... But I am quite happy that the
scaling code is over 100% faster now, at least for large images and on my
computer.
I have some more ideas how the scaling code can optimized further. Basically,
the Mitchell filter needs 5 src pixels for every destination pixel and right
now the scaling code is basically reading each src line five times. If I
manage to write an algorithm that checks if we already read a line instead of
reading it from the src image everytime, the Mitchell algorithm should become
even faster (and all other algorithms for which the filter support is greater
then one). So have a good night,
Michael
More information about the kimageshop
mailing list