Bug 511959 - Alpha channel filled with black when copying images from KDE applications
Summary: Alpha channel filled with black when copying images from KDE applications
Status: NEEDSINFO WAITINGFORINFO
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard widget & pop-up (other bugs)
Version First Reported In: 6.5.2
Platform: unspecified Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-11 15:31 UTC by Женя Бородин
Modified: 2026-01-05 20:05 UTC (History)
6 users (show)

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


Attachments
saved screen (104.50 KB, image/png)
2025-11-11 15:40 UTC, Женя Бородин
Details
screen copied (150.85 KB, image/jpeg)
2025-11-11 15:42 UTC, Женя Бородин
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Женя Бородин 2025-11-11 15:31:53 UTC
SUMMARY
When using a dark Plasma theme, taking a screenshot of the active window with Spectacle (launched from the menu) produces a black background instead of white.
This occurs both when saving the screenshot to a file (PNG) and when copying it to the clipboard.
Opening the saved file in Gwenview shows a black background.
Using Meta+PrintScreen produces a screenshot with the correct white background.

STEPS TO REPRODUCE
1 Switch to a dark Plasma theme.
2 Launch Spectacle from the menu or terminal.
3 Select Active Window capture mode.
4 Take a screenshot:
Option A: Save the screenshot as PNG.
Option B: Copy the screenshot to the clipboard.
5 Open the saved PNG in Gwenview — the background is black.
6 Paste the copied image from the clipboard into an app (Gwenview, GIMP, etc.) — the background is also black.
7 Use Meta+PrintScreen — background is white, as expected.

OBSERVED RESULT

Both the saved PNG (opened in Gwenview) and the clipboard image show a black background.
The issue occurs only in dark Plasma themes and only when using Spectacle from the menu.
Meta+PrintScreen works correctly (white background).
Cause: incorrect handling of the alpha channel in Spectacle.

EXPECTED RESULT
Both saved and copied screenshots from Spectacle should have a white background or correct transparency.
Screenshots should match the behavior of Meta+PrintScreen.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20251109
KDE Plasma Version: 6.5.2
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Kernel Version: 6.17.7-1-default (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Xeon® CPU E3-1220 V2 @ 3.10GHz
Memory: 16 GiB of RAM (15.6 GiB usable)
Graphics Processor: AMD Radeon RX 570 Series

ADDITIONAL INFORMATION

- The issue occurs only with dark Plasma themes.
- Both saved files (opened in Gwenview) and clipboard images show the black background.
- Meta+PrintScreen works correctly with a white background.
- Likely caused by incorrect alpha channel handling in Spectacle.
- Bug is consistently reproducible in Wayland.
- Two test files can be attached:
- screenshot_saved.png — saved file with black background (open in Gwenview)
- screenshot_copied.png — clipboard image with black background
Comment 1 Женя Бородин 2025-11-11 15:40:21 UTC
Created attachment 186703 [details]
saved screen
Comment 2 Женя Бородин 2025-11-11 15:42:14 UTC
Created attachment 186704 [details]
screen copied
Comment 3 Жора Змейкин 2025-11-15 21:02:33 UTC
I'm not sure this is specifically a Spectacle or dark theme problem. It seems like some issue with how KDE applications interact with the clipboard, because a similar bug occurs in both Gwenview and Spectacle when copying an image from the GUI.

Here's an example:
1. Open any image with an alpha channel (like a window screenshot) in Gwenview
2. Press Ctrl+C
3. Paste into Telegram Desktop or KolourPaint
4. Done! Our image's alpha channel gets filled with black

But if you copy the image file through Dolphin, for example, the alpha channel won't get filled. Out of curiosity, I tried the GNOME image viewer - this problem doesn't exist there.

I've moved this bug from the Spectacle application to the general group so it can be properly categorized and receive appropriate attention.

SOFTWARE/OS VERSIONS
Operating System: ALT Linux 20250612
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.19.0
Qt Version: 6.9.3
Kernel Version: 6.17.7-6.17-alt1 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-5200U CPU @ 2.20GHz
Memory: 16 ГиБ of RAM (15.5 ГиБ usable)
Graphics Processor 1: Mesa Intel® HD Graphics 5500
Graphics Processor 2: NVIDIA GeForce 940m
Manufacturer: Acer
Product Name: Aspire E5-573G
System Version: V3.72
Comment 4 Fushan Wen 2025-11-22 00:51:33 UTC
Cannot reproduce with both applications. GIMP 3.0.6 and Libreoffice 25.8.2.2
Comment 5 Fushan Wen 2025-11-22 00:52:52 UTC
Sorry wrong reply
Comment 6 Nate Graham 2026-01-05 20:05:18 UTC
> and only when using Spectacle from the menu.
Can you clarify what this means, exactly?

As for the Plasma theme, is it sufficient to use Breeze Dark to test this?