Bug 482750

Summary: [wayland] Spectacle Rectangle Select / Multi-Display screenshots blurry on unscaled displays when scaled display in use
Product: [Applications] Spectacle Reporter: Eamonn Rea <eamonnrea>
Component: GeneralAssignee: Noah Davis <noahadvs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: kde, nate
Priority: NOR Keywords: qt6
Version: 24.02.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Rectangle Select Screenshot from Scaled Display
Rectangle Select Screenshot from Non Scaled Display
Current Window Screenshot from Non Scaled Display

Description Eamonn Rea 2024-03-07 17:19:01 UTC
SUMMARY
I have a display at 150% scale and several displays with no scaling. When taking a screenshot, screenshots from the scaled display look crisp, but screenshots on unscaled displays are blurry. This can even be observed when activating the rectangle select, where unscaled displays become a little blurry while the effect is active.

This issue does not occur when taking a single-window screenshot or single-display screenshot, only with rectangle-select or a screenshot of all displays. 

I will attach a screenshot of the same text taken on the scaled display (crisp), and then taken on the unscaled display (blurry). Then, finally, I will attached a cropped single-window screenshot from the unscaled display (crisp, like the scaled display).

STEPS TO REPRODUCE
1. Activate a Rectangle Select / Full-Display screenshot
2. Zoom in a little
3. Observe blur that does not occur with a screenshot of or on the same display, taken as either a screenshot of the whole current display, or of the active window on the same display that produces a blurry screenshot
4. Take a screenshot of any kind on the scaled display
5. Scaled display looks like screenshots do on previous Spectacle versions prior to Plasma 6

OBSERVED RESULT
Screenshots on non-scaled displays are blurry only if Rectangle Select / Full Display screenshots are taken. Single-display or single-window screenshots look fine across all displays.


EXPECTED RESULT
Screenshots on non-scaled displays should look crisp across all displays.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux Zen 6.7.8 (Arch Linux)
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
The filesize appears to be notably larger for screenshots on non-scaled displays, even if the contents are identical. Maybe this is a result of the blur.
Comment 1 Eamonn Rea 2024-03-07 17:19:44 UTC
Created attachment 166617 [details]
Rectangle Select Screenshot from Scaled Display

Screenshot captured on Scaled Display using Spectacle Rectangle Region Select.
Comment 2 Eamonn Rea 2024-03-07 17:20:30 UTC
Created attachment 166618 [details]
Rectangle Select Screenshot from Non Scaled Display

Screenshot captured on Non Scaled Display using Spectacle Rectangle Region Select.
Comment 3 Eamonn Rea 2024-03-07 17:21:34 UTC
Created attachment 166619 [details]
Current Window Screenshot from Non Scaled Display

Screenshot captured of Full Current Window on Non Scaled Display, then cropped mimic how a rectangle region screenshot would look.
Comment 4 Eamonn Rea 2024-03-07 17:23:16 UTC
When posting the screenshots and viewing them, I just realised that the non-scaled region screenshot's resolution is too large. It is virtually identical to the resolution of the scaled display screenshot. Perhaps the screenshot from the unscaled display is being upscaled?
Comment 5 Nate Graham 2024-03-08 00:03:34 UTC

*** This bug has been marked as a duplicate of bug 478426 ***
Comment 6 Eamonn Rea 2024-05-27 20:31:49 UTC
I don't believe this bug is a duplicate of the listed bug, as my problem still persists. My issue is specific to region screenshots.

With Spectacle 24.05.0, this issue now also applies when taking region screenshots on a scaled display. They are always scaled up too much.

The quality is also significantly worse now, with ugly sharpening that makes everything look too sharp as well as giving a strange off-colour artifacting when there is contrast (there is an artifacting border around white text on a black background for example).

Again, this is not cross-display region selects. This is a region select on a single display, and for some reason they cannot look the same as single-display screenshots.

If I take an "Entire Desktop" screenshot (across all displays), there are numerous problems:
- The scaled display exhibits the same problem as Region Screenshot.
- The non-scaled displays are fine, but their resolution is wrong (cropping a section of the screenshot on a 1920x1080 display shows that the display is rendered as 3840x2160). However they look crisp and fine, although the resolution is wrong and thus balloons the filesize

To emphasise, screenshots look normal if any other screenshot type that is not Rectangular Region or Entire Desktop is used. I can take a Current Monitor screenshot of either my scaled or non-scaled displays, and then crop them down and it works fine (this is my current workaround that I've been living with since Plasma 6). But I cannot do the following:
- Take a Region Screenshot on a Scaled Display (not *across* displays, just a small region on the display)
    - The resolution is wrong
    - It is blurry
- Take a Region Screenshot on a Non-Scaled display
    - The resolution is wrong
    - It is overly-sharpened
- Take an "Entire Desktop" screenshot
    - The resolution is wrong
    - The content on the scaled display has the same problem as the Region Screenshot
    - The non-scaled displays' content looks fine, but it is the wrong resolution (3840x2160, up from 1920x1080 -- 3840p is the native resolution of the scaled display) 

Spectacle worked absolutely fine in Plasma 5.27, it has only been with Plasma 6 that there have been immense difficulties taking screenshots. Why can screenshots not be captured at the native resolution of the display?
Comment 7 Eamonn Rea 2024-05-27 22:13:52 UTC
Reading back part of my reply, I wanted to clarify this part

> Why can screenshots not be captured at the native resolution of the display?

I meant this from a technical perspective. To rephrase: What changed between Plasma 5.27 and Plasma 6 that broke this functionality, and why is this a difficult problem to solve? I don't claim to be an expert, but I *am* curious!
Comment 8 Noah Davis 2024-05-30 04:27:06 UTC
If you are experiencing a new issue, can you post a new bug report so that we can track it properly?
Comment 9 Eamonn Rea 2024-06-03 23:12:59 UTC
I think the issue is related here, but sure, I can open a new issue. 🙂
Comment 10 Eamonn Rea 2024-06-03 23:28:32 UTC
Filed a separate bug report at Bug 487997.