Bug 377060 - Scale Down 50% is blurry with Linear Filter
Summary: Scale Down 50% is blurry with Linear Filter
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: General (other bugs)
Version First Reported In: 5.2.11
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-01 13:40 UTC by Paul Geraskin
Modified: 2025-09-11 15:37 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
PSD File to test (1.58 MB, image/vnd.adobe.photoshop)
2017-03-01 13:40 UTC, Paul Geraskin
Details
scaled down with 2.9.0 and 3.0.0 (556.31 KB, application/x-zip-compressed)
2017-03-01 17:09 UTC, Halla Rempt
Details
Difference between the two images (947.55 KB, image/png)
2017-03-14 14:48 UTC, Dmitry Kazakov
Details
difference (932.44 KB, image/png)
2017-03-14 15:17 UTC, Halla Rempt
Details
difference kra file (1.42 MB, application/x-krita)
2017-03-14 15:17 UTC, Halla Rempt
Details

Note You need to log in before you can comment on or make changes to this bug.
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.