Bug 432753

Summary: Annotating removes transparency from screenshots of windows
Product: [Applications] Spectacle Reporter: Bharadwaj Raju <bharadwaj.raju777>
Component: GeneralAssignee: Boudhayan Gupta <me>
Status: RESOLVED FIXED    
Severity: normal CC: kde, lv215bd5, nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In: 21.12
Attachments: before annotating
after annotating
transparency appears to be preserved during the actual annotation/editing process

Description Bharadwaj Raju 2021-02-10 18:24:16 UTC
SUMMARY
If you try to annotate a screenshot of a window (which has that semi-transparent border/shadow with it), it replaces it with solid white.

STEPS TO REPRODUCE
1. Take a screenshot of a window.
2. Click Annotate
3. Click Annotation Done.

OBSERVED RESULT
Semi-transparent shadow/border is gone, replaced with solid white

EXPECTED RESULT
Transparent elements are preserved

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.21.80 (Neon Unstable)
KDE Plasma Version: 5.21.80
KDE Frameworks Version: 5.79.0
Qt Version: Neon Unstable up to date

ADDITIONAL INFORMATION
Transparency appears to be preserved during the annotation editing process. It is only lost when saving.
Comment 1 Bharadwaj Raju 2021-02-10 18:24:41 UTC
Created attachment 135568 [details]
before annotating
Comment 2 Bharadwaj Raju 2021-02-10 18:25:01 UTC
Created attachment 135569 [details]
after annotating
Comment 3 Bharadwaj Raju 2021-02-10 18:25:30 UTC
Created attachment 135570 [details]
transparency appears to be preserved during the actual annotation/editing process
Comment 4 Nate Graham 2021-02-11 16:16:14 UTC
Confirmed.
Comment 5 Nate Graham 2021-06-08 19:29:37 UTC
*** Bug 438215 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2021-06-08 19:29:59 UTC
Not sure if this is our bug, or an upstream bug in KImageAnnotator.
Comment 7 Bug Janitor Service 2021-10-30 10:12:37 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/spectacle/-/merge_requests/91
Comment 8 Nate Graham 2021-11-03 19:22:30 UTC
Git commit 741b6fc4f06751caf14a6165c66f0900fd5fd353 by Nate Graham, on behalf of Julius Zint.
Committed on 03/11/2021 at 19:20.
Pushed by ngraham into branch 'master'.

Annotation: set canvas background to transparent

The default canvas color is white. So when annotating images with
transparency (screen shot of window with a drop shadow), the transparent
areas will be white, because the annotation widget uses the canvas color
for the image background.
FIXED-IN: 21.08.3

M  +1    -0    src/Gui/KSWidget.cpp

https://invent.kde.org/graphics/spectacle/commit/741b6fc4f06751caf14a6165c66f0900fd5fd353