Bug 515274 - “Paste into New Image” (Krita->Krita) loses color profile
Summary: “Paste into New Image” (Krita->Krita) loses color profile
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: * Unknown (other bugs)
Version First Reported In: 5.2.14
Platform: NixOS Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-29 19:21 UTC by Sami Liedes
Modified: 2026-03-05 12:34 UTC (History)
1 user (show)

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


Attachments
test image exhibiting the bug (though I think any image might do) (120.26 KB, image/png)
2026-01-29 19:21 UTC, Sami Liedes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sami Liedes 2026-01-29 19:21:38 UTC
Created attachment 189039 [details]
test image exhibiting the bug (though I think any image might do)

Coming from https://krita-artists.org/t/paste-into-new-image-krita-krita-loses-color-profile/161872/1 .

Please note that this may be somehow Wayland-related. I am running Krita on sway.

SUMMARY

"Paste as new image" claims the data has no color profile when copying from Krita itself (while mere Paste is not fooled).

STEPS TO REPRODUCE

1. Open "ICC Rendering Intent Test.png" in Krita
2. Menu->Select->Select ALl
3. Edit->Copy
4. Edit->Paste into New Image

OBSERVED RESULT

A dialog about "Missing Color Profile", asking whether to interpret as sRGB or "As on Monitor".

EXPECTED RESULT

Krita uses the color profile of the original image.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: NixOS unstable
KDE Plasma Version: I think not applicable / used here?
KDE Frameworks Version: I assume this is the version of things like kio? Then 5.116.0.
Qt Version: 5.15.18

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2026-02-18 18:40:53 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/2655
Comment 2 Dmitry Kazakov 2026-03-05 12:22:41 UTC
Git commit ba02429ddae3ce40d71c1ae0c7caa354b49e0de4 by Dmitry Kazakov, on behalf of Luna Lovecraft.
Committed on 05/03/2026 at 12:22.
Pushed by dkazakov into branch 'master'.

Fix pasting selection into a new image missing colorspace


`KisClipboard::clipFromMimeData()` was ignoring any layer information
present in the clipboard and just getting the QImage instead,
which does not contain the color space info.

M  +32   -0    libs/ui/kis_clipboard.cc

https://invent.kde.org/graphics/krita/-/commit/ba02429ddae3ce40d71c1ae0c7caa354b49e0de4
Comment 3 Dmitry Kazakov 2026-03-05 12:34:21 UTC
Git commit 5151c75a23953ff258bb6809f58a926a361980a9 by Dmitry Kazakov.
Committed on 05/03/2026 at 12:34.
Pushed by dkazakov into branch 'krita/6.0'.

Fix pasting selection into a new image missing colorspace


`KisClipboard::clipFromMimeData()` was ignoring any layer information
present in the clipboard and just getting the QImage instead,
which does not contain the color space info.


(cherry picked from commit ba02429ddae3ce40d71c1ae0c7caa354b49e0de4)

90b7ff8a Fix pasting selection into a new image missing colorspace
5ca28bbe Implement colorspace selection for clipFromKritaLayers
030490a6 Fix a safeAssert in clipFromKritaLayers when copying a mask

Co-authored-by: Luna Lovecraft <ciubix8514@gmail.com>

M  +32   -0    libs/ui/kis_clipboard.cc

https://invent.kde.org/graphics/krita/-/commit/5151c75a23953ff258bb6809f58a926a361980a9