Bug 436615 - Problem rendering images with scaling enabled
Summary: Problem rendering images with scaling enabled
Status: CONFIRMED
Alias: None
Product: kolourpaint
Classification: Applications
Component: general (show other bugs)
Version: 24.05.1
Platform: Arch Linux Linux
: HI major
Target Milestone: ---
Assignee: kolourpaint-support
URL:
Keywords:
: 399218 436135 462340 476441 488595 488710 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-05-05 09:19 UTC by firewalker
Modified: 2024-12-16 10:05 UTC (History)
10 users (show)

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


Attachments
Image displaing the issue. (351.76 KB, image/png)
2021-05-05 09:19 UTC, firewalker
Details
Global scale 125%, KP Zoom 100% (289.25 KB, image/png)
2024-11-19 19:02 UTC, ato300
Details
Global scale 125%, KP Zoom 80% (284.45 KB, image/png)
2024-11-19 19:03 UTC, ato300
Details

Note You need to log in before you can comment on or make changes to this bug.
Description firewalker 2021-05-05 09:19:12 UTC
Created attachment 138160 [details]
Image displaing the issue.

When screen scaling is enabled, kolourpaint is unable to render images properly.

In the attaching file you can see the same image file opened with Kolourpaint and Gwenview. Both in 100%. As you can see koloupaint doesn't render the image correctly.

I think it tries to scale the image according to the global scaling factor.

STEPS TO REPRODUCE
1. Enable screen scaling
2. Open an image

OBSERVED RESULT
see attached file.

KDE Frameworks 5.81.0
Qt 5.15.2 (built against 5.15.2)
The xcb windowing system
Comment 1 firewalker 2021-05-05 09:39:29 UTC
My global scale factor is 125% (1.25). Running kolourpaint with 0.8 factor (1/1.25) it renders the image OK, but the menus are tiny.

QT_SCALE_FACTOR=0.8 kolourpaint
Comment 2 Nate Graham 2021-05-05 19:51:20 UTC
Does it work okay with an integer scale factor like 200%? Everything will be absurdly large of course, but can you check anyway?
Comment 3 firewalker 2021-05-05 20:30:30 UTC
I can;t even login with a global scale of 200%. But using QT_SCALE_FACTOR=2 and zooming out to 50%, the image seems OK.

But the canvas should not be zoomed when a scaling factor is used. Like in gwenview for example.
Comment 4 Nate Graham 2021-05-05 21:23:32 UTC
Just fractional scale factors then, I guess.
Comment 5 firewalker 2021-05-05 21:38:08 UTC
No. Not only fractional. With every scale factor. It just hapens that with integer fraction someone can use the zoom function in order to see things properly.

The canvas size should not change according to the scale factor. Now it changes regardless of a fractional or integer scale factor.
Comment 6 Evren 2024-06-18 12:32:33 UTC
I can confirm the bug still persists
If scaling is higher than 100%, drawn image inside scaled with nearest neighbour and looks bad.
May be worked around by disabling scaling for this app, in that case menus and tools would look too small.

KolourPaint 24.05.1
ArchLinux 6.9.5
Plasma 6.0.5
Framework: 6.3.0
Qt: 6.7.1
Xorg on SDDM
Comment 7 Christoph Feck 2024-07-31 20:07:49 UTC
*** Bug 462340 has been marked as a duplicate of this bug. ***
Comment 8 Christoph Feck 2024-07-31 20:08:08 UTC
*** Bug 488710 has been marked as a duplicate of this bug. ***
Comment 9 Christoph Feck 2024-07-31 20:08:22 UTC
*** Bug 488595 has been marked as a duplicate of this bug. ***
Comment 10 Christoph Feck 2024-07-31 20:09:02 UTC
*** Bug 476441 has been marked as a duplicate of this bug. ***
Comment 11 Christoph Feck 2024-07-31 20:09:43 UTC
*** Bug 436135 has been marked as a duplicate of this bug. ***
Comment 12 Christoph Feck 2024-07-31 20:11:34 UTC
*** Bug 399218 has been marked as a duplicate of this bug. ***
Comment 13 ato300 2024-11-19 19:02:13 UTC
Created attachment 175955 [details]
Global scale 125%, KP Zoom 100%
Comment 14 ato300 2024-11-19 19:03:54 UTC
Created attachment 175956 [details]
Global scale 125%, KP Zoom 80%

Demonstrates how at Zoom 80% it looks the way it should be looking by default (when Zoom is 100%).
Comment 15 ato300 2024-11-19 19:04:42 UTC
Comment on attachment 175955 [details]
Global scale 125%, KP Zoom 100%

Demonstrates the problem.
Comment 16 ato300 2024-11-19 19:06:46 UTC
I tested this on 4 different instances of Kubuntu on 3 different machines:

1. Kubuntu 22.04, X11, KolourPaint 23.08.4 (snap)
2. Kubuntu 24.04, X11, KolourPaint 23.08.5 (apt)
3. Kubuntu 24.10, Wayland, KolourPaint 24.08.3 (flatpak)
4. Kubuntu 22.04, X11, KolourPaint 23.08.4 (snap) + KolourPaint 21.12.3 (apt)

The issue was present everywhere, but it's important to note that on all except #3, changing "Global scale" in "Display Configuration" would really take effect (at least in terms of how KolourPaint behaves) after an OS restart. Not sure if it was due to the newer version of KP, Plasma or because of Wayland. Keep that in mind when testing - if you booted with Global scale at 100%, you might be unable to reproduce immediately.

So to confirm the issue, KolourPaint looks good only when I set its Zoom % to 100/<GlobalScale> (for example, if Global scale is at 125, I need to set Zoom % in KolourPaint to 80).

Just to point out that when we are taking a screenshot, everything behaves as expected. For example, if a given window's size at Global scale 125% is 1000x500 px, when I change Global scale to 150% and take a screenshot of the same window (w/o resizing it), I can see that screenshot is 1200x600 px (same proportion 5:6, as 125:150).

I've uploaded 2 examples from #3 (24.10). In all of them I've displayed two screenshots - on the right is one taken at a higher Global scale, so it's a bit larger, but as can be seen that doesn't matter (when it's good, it's good on both sides, and vice versa). In all of them I've shown Gwenview instances below the KolourPaint ones, for comparison. As can be seen, Gwenview at 100% always displays things correctly.

- Screenshot_125_100_bad.png - Global scale is 125%, KP Zoom is 100%. KP looks bad.
- Screenshot_125_80_good.png - Global scale is 125%, I've manually set KP Zoom to 80%. KP looks good, as it should be looking when Zoom is at 100%.

I hope that helps.
Comment 17 John Kizer 2024-12-06 06:02:50 UTC
I can reproduce this on KolourPaint 24.08.3, Fedora Linux 41.