Krita and scaling

Michael Thaler michael.thaler at ph.tum.de
Thu Aug 19 01:30:31 CEST 2004


Hello,

first, there is definitely a bug in the Krita painting code which gets 
triggered when an image, that is larger then the screen resolution, is scaled 
down. I made two screenshots:

http://www1.physik.tu-muenchen.de/~mthaler/krita1.jpg shows the original image 
which is 1600 x 1200 pixels and does not fit on my screen.

http://www1.physik.tu-muenchen.de/~mthaler/krita2.jpg shows the image scaled 
down to 800x600 pixel with Boudewijn's old algorithm. It looks like certain 
tiles are not painted.

I also ported the scaling code from the Graphics Gems III book Adrian 
mentioned, to Krita. I got it working and the results are very nice:

http://www1.physik.tu-muenchen.de/~mthaler/krita3.jpg shows the original 
image.

http://www1.physik.tu-muenchen.de/~mthaler/krita4.jpg shows the image scaled 
uo to 145% of the original image.

http://www1.physik.tu-muenchen.de/~mthaler/krita5.jpg shows the image scaled 
down to 46% of the original image.

I used the Mitchell filter to produce these screenshots, it is a cubic 
interpolation filter.

Actually the scaling routine has still some bugs: the column on the very right 
and the lowest row are black. Also the code is quite complex right now and I 
want to clean it up before I post the patch to the list. Maybe I have time 
for that tomorrow evening or on Friday,

Good night,
Michael


More information about the kimageshop mailing list