Created attachment 172988 [details] The file that won't export to Photoshop *** If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** SUMMARY Other similar images will export to Photoshop but this one won't for some reason , whether the colorspace is "gray built-in" or "Grayscale/Alpha Dot Gain 20%" STEPS TO REPRODUCE 1. File/Export 2. Photoshop image 3. Save OBSERVED RESULT 'Error: cannot save this image as a Photoshop image... one or more layers with a color model that is different from the image." EXPECTED RESULT SOFTWARE/OS VERSIONS Windows: macOS: (available in the Info Center app, or by running `kinfo` in a terminal window) Linux/KDE Plasma: KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
I can confirm the bug in master with the file provided. I have not look deep enough yet, but manipulating the image and layers from the GUI does not fix the issue.
There is a hidden layer in the file called "decorations-wrapper-layer" with a color profile of sRGB-elle-V2-srgbtrc.icc, which is caused by "Show Guides" being on. Turning off "Show Guides" lets the file export as PSD.
Something like diff --git a/libs/impex/ColorModelHomogenousCheck.h b/libs/impex/ColorModelHomogenousCheck.h index 494791e538..7bdf576c1c 100644 --- a/libs/impex/ColorModelHomogenousCheck.h +++ b/libs/impex/ColorModelHomogenousCheck.h @@ -84,7 +84,7 @@ private: bool check(KisNode * node) { KisLayer *layer = dynamic_cast<KisLayer*>(node); - if (layer) { + if (layer && layer->name() != "decorations-wrapper-layer") { const KoColorSpace * cs = layer->colorSpace(); if (cs->colorModelId() != m_colorModelID || cs->colorDepthId() != m_colorDepthID) { Should prevent this warning from happening, but I wonder how many other layer visitors need the same thing.
Hi, Halla! You should use `KisBaseNode::isFakeNode()` for skipping non-exportable nodes.
Right! Will do.
Git commit 02671ca7e0b77c2dc5d90f4b237f28b470557a72 by Halla Rempt. Committed on 27/08/2024 at 08:57. Pushed by rempt into branch 'krita/5.2'. Check whether a layer is fake The homogenous check should disregard fake nodes. M +1 -1 libs/impex/ColorModelHomogenousCheck.h https://invent.kde.org/graphics/krita/-/commit/02671ca7e0b77c2dc5d90f4b237f28b470557a72
Git commit 28a8d2d4d5a67c6e398511a7501bd1b8afc42b23 by Halla Rempt. Committed on 31/08/2024 at 10:56. Pushed by rempt into branch 'master'. Check whether a layer is fake The homogenous check should disregard fake nodes. (cherry picked from commit 02671ca7e0b77c2dc5d90f4b237f28b470557a72) M +1 -1 libs/impex/ColorModelHomogenousCheck.h https://invent.kde.org/graphics/krita/-/commit/28a8d2d4d5a67c6e398511a7501bd1b8afc42b23