14
Feb
This weekend have so far resulted in 5 commits on Krita. In particular on the scaling stuff. Krita has for way too long had some outstanding quality issues with scaling. The edge pixels were transparent and the images themselves were too blurry.
Just see this page from over 2 years ago: http://gis-blog.leonde.de/index.php/2006/11/10/scaling-algorithms-in-krita/
Well this weekend was the day to end the misery. I started with implementing bicubic filtering which removed the blur, and went on to fix the transparent edges. The main part of the bug was actually a simplerounding error, but looking into the issue i also found that the filter weights were being applied wrongly, so I fixed that too.
But that was not all. The code for mixing of colors couldn't handle negative weights which gave some weird colors popping up weird places in the images. After some debugging all it took to fix it was clamping the resulting rgb values to not be negative.
After that I fixed some regressions regarding progress feedback while scaling, and right now I've bugged Sven Langkamp to help me with the selection stuff in the transform tool. Funny thing is I was his mentor on a GSoC about selections two years ago and now he is the one who helps me :)
Anyway here are the results so judge for yourself (I've used the same original as in the blog I referred to above and bicubic filters in all cases).
Photoshop 7:

Gimp 2.6.1:

Krita (trunk):

I'm quite pleased as it looks very similar to photoshop.
- boemann's blog
- Login or register to post comments

Comments
Much better
I think it's much better now. But Krita is still a little bit more blurry then Photoshop and Gimp. And overall, I think Gimps results are the best.
Nice work. But I can't
Nice work. But I can't believe that the first one in the original post is Lanczos resampling. There must be something wrong with the implementation. It usually gives quite good results.
true
some of the bugs i fixed were messing up the lanczos. Btw we have removed lanczos from krita now along with all other except bilinear and bicubic. If demand is high enough we might reintroduce lanczos
I see. Have you tried
I see. Have you tried comparing the results of upsampling? Lanczos should theoretically be better at that than cubic.