Bug 485066 - When you annotate an image in Gwenview, the resulting image is upscaled if display scaling is enabled
Summary: When you annotate an image in Gwenview, the resulting image is upscaled if di...
Status: CONFIRMED
Alias: None
Product: gwenview
Classification: Applications
Component: general (other bugs)
Version First Reported In: 24.02.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-05 06:35 UTC by nyanpasu64
Modified: 2025-07-09 10:45 UTC (History)
2 users (show)

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


Attachments
A 2x1 checkerboard edited by X11 Gwenview's Annotate button at 125% scaling. (3.71 KB, image/png)
2024-04-05 06:35 UTC, nyanpasu64
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nyanpasu64 2024-04-05 06:35:46 UTC
Created attachment 168171 [details]
A 2x1 checkerboard edited by X11 Gwenview's Annotate button at 125% scaling.

SUMMARY
If your screen is set to fractional (eg. 125%) or 200% scaling, and you annotate an image from Gwenview, the resulting image is scaled by 125% or 200% rather than retaining its original size.

STEPS TO REPRODUCE
1. Login under X11 or Wayland with display scaling enabled.
2. Open an image in Gwenview.
3. In the left sidebar, click Annotate.
4. Optionally draw on the image. Then click OK.

OBSERVED RESULT
On X11, the image is resized by your current display scale factor (eg. 125%), using nearest neighbor interpolation (which results in uneven pixels).
On Wayland, the image is resized by (your current display scale factor → rounded up to the nearest integer scale factor). At 125% scaling, this is 200%.

EXPECTED RESULT
You can draw on the image at its original resolution (like editing it in GIMP or Kolourpaint).

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3
Kernel Version: 6.7.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 570 Series
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B550M DS3H

ADDITIONAL INFORMATION
Comment 1 madness742 2025-05-25 12:22:36 UTC
I can confirm the same behaviour. The image goes from 2318x3239 to 4636x6478.

My main monitor uses 125% scaling and my second monitor uses 200% scaling. It seems like it used the non-primary monitor scaling.

Operating System: Fedora Linux 42
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0
Gwenview Version: 25.04.1
Comment 2 Bojidar Marinov [:bojidar-bg] 2025-07-09 10:45:41 UTC
I tracked this down to an issue in kImageAnnotator, which ends up rescaling images ever since ~ https://github.com/ksnip/kImageAnnotator/commit/21d9b05603c876e4adc235f0607d339087a3f64a

I have submitted a pull request on kImageAnnotator: https://github.com/ksnip/kImageAnnotator/pull/342

I wonder if it makes sense for Gwenview to reuse Spectale's annotation tools somehow..