Bug 377060

Summary: Scale Down 50% is blurry with Linear Filter
Product: [Applications] krita Reporter: Paul Geraskin <paulgeraskin>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: CONFIRMED ---    
Severity: minor CC: dimula73, griffinvalley, halla, nicholaslapointe8
Priority: NOR    
Version First Reported In: 5.2.11   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: PSD File to test
scaled down with 2.9.0 and 3.0.0
Difference between the two images
difference
difference kra file

Description Paul Geraskin 2017-03-01 13:40:02 UTC
Created attachment 104297 [details]
PSD File to test

Hi devs!

I've found that Krita Scale Down Image to 50% is very blurry.
I have tested it in Gimp and Krita.

I have attached the image.

Here are my tests:
http://i.imgur.com/VIOJ9z3.png
http://i.imgur.com/tW6OBrT.png
Comment 1 wolthera 2017-03-01 14:13:18 UTC
As far as I know, it's actually Gimp which is at fault here. The Gimp's bilinear filter for scaling is considered so sharp that people often recommend blurring an image before scaling it down with Gimp.
Comment 2 Halla Rempt 2017-03-01 14:25:54 UTC
So, not a bug.
Comment 3 Paul Geraskin 2017-03-01 16:03:25 UTC
It's a  bug 100%.

Bilinear Filter is the sharpest filter against Lancoz and Box filters.

You forced me to open PS. ))

Here are results:
http://i.imgur.com/7r2s10l.png
http://i.imgur.com/pfUfpOb.png

Also, if I open the attached PSD file and set Krita's viewport to 50% it will have nice sharpen result. http://i.imgur.com/bEoEj2T.png
Comment 4 Paul Geraskin 2017-03-01 16:03:44 UTC
Could, you change the status, please?
Comment 5 Dmitry Kazakov 2017-03-01 16:10:03 UTC
Ше шы куфддн ф игп
Comment 6 Dmitry Kazakov 2017-03-01 16:10:32 UTC
It is really a bug. Bilinear should be the sharpest scaling filter.
Comment 7 Halla Rempt 2017-03-01 16:18:40 UTC
Oh, come on... If it were a bug, then it would be a bug that we have had since _2004_. And in the past 13 years, nobody would have noticed it? And that is "major"? I cannot believe that.
Comment 8 Dmitry Kazakov 2017-03-01 16:22:08 UTC
Hi, Boud!

Just check the attached screenshots. The scaled image looks extremely blurry, which it didn't use to. I have a feeling that Bicubic strategy is selected somehow. When I refactored the stuff a couple of years ago, the scaled images looked okay.

So I really feel that this is some kind of regression.
Comment 9 Paul Geraskin 2017-03-01 16:27:20 UTC
Right now I have a freelance job where i have to paint images and then scale them down to 50% to send them to my partner. It's major for me. Sorry. )

Right now I'm using Lancoz filter. It does the job. But Linear filter is the best to scale down to 50% with the best quality.

Thanks.
Comment 10 Halla Rempt 2017-03-01 17:09:19 UTC
Created attachment 104304 [details]
scaled down with 2.9.0 and 3.0.0

I have no system where 2.8 is still working, but 2.9 and 3.0 give identical results. As is to be expected, since nobody has touched this code since 2005.
Comment 12 Dmitry Kazakov 2017-03-05 10:08:12 UTC
(In reply to Boudewijn Rempt from comment #10)
> Created attachment 104304 [details]
> scaled down with 2.9.0 and 3.0.0
> 
> I have no system where 2.8 is still working, but 2.9 and 3.0 give identical
> results. As is to be expected, since nobody has touched this code since 2005.

Hi, Boud!

Just loking into **your** attached images, I can clearly see that 29.png is **much** sharper and clear than 30.png. So this is a regression.

I have refactored transformation algorithms around 2012 and I remember that the result was much better that this.
Comment 13 Halla Rempt 2017-03-06 09:16:53 UTC
On Sun, 5 Mar 2017, Dmitry Kazakov wrote:

> Just loking into **your** attached images, I can clearly see that 29.png is
> **much** sharper and clear than 30.png. So this is a regression.

The images are absolutely identical. If I load 29 and 30 into the same image
and set the blending mode to difference, the result is a uniform black canvas.
Comment 14 Nicholas LaPointe 2017-03-12 16:19:18 UTC
(In reply to Boudewijn Rempt from comment #13)
> The images are absolutely identical. If I load 29 and 30 into the same image
> and set the blending mode to difference, the result is a uniform black
> canvas.
I actually notice the same as Dmitry, with 29 being sharper. Difference gives me a mostly, but certainly not entirely, black canvas.
Comment 15 Dmitry Kazakov 2017-03-14 14:48:41 UTC
Created attachment 104559 [details]
Difference between the two images

The difference is actually not a black canvas :) It has quite a lot of data inside.
Comment 16 Halla Rempt 2017-03-14 15:17:16 UTC
Created attachment 104560 [details]
difference

This is how I checked the difference. I see you have three layers in your stack?
Comment 17 Halla Rempt 2017-03-14 15:17:39 UTC
Created attachment 104561 [details]
difference kra file
Comment 18 Halla Rempt 2017-03-14 15:57:12 UTC
Argh, now I get it. That's an adjustment layer... Well, I still don't understand what can have changed -- the imagesize plugin hasn't changed, the filters haven't changed, the filters don't use vc or eigen, which have changed.
Comment 19 Vitamorus 2025-09-11 15:37:10 UTC
Reconfirming this bug. Krita's (bi)linear downscaling is blurred compared to what GIMP produces.