Bug 397612 - Filter Mask (Color Adjustment) loses settings when converting image color space.
Summary: Filter Mask (Color Adjustment) loses settings when converting image color space.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Filter Layers (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords: investigated, triaged
Depends on:
Blocks:
 
Reported: 2018-08-19 09:47 UTC by Yncke
Modified: 2022-09-16 13:10 UTC (History)
2 users (show)

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


Attachments
segfault backtrace (4.25 KB, text/plain)
2018-09-16 04:27 UTC, Emmet O'Neill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yncke 2018-08-19 09:47:23 UTC
Krita 4.1.1, Windows 7 Professional SP1.

When converting an image with a Color Adjustment filter mask from RGB to Grey, the settings are lost. I have not tested other conversions.

How to reproduce:
- create an RGB image
- add a Filter Mask (Color Adjustment) with non-default settings
- convert image color space to grey
- reopen the Filter Mask (Color Adjustment) properties. They are the default settings
Comment 1 Emmet O'Neill 2018-09-16 04:25:41 UTC
I can confirm this behavior and it's actually a little bit worse than it sounds.

1.) Following the steps that Yncke describes exactly causes a segmentation fault crash (SIGSEGV) on my system (Kubuntu 18.04 running compiled master @ git 12b52e3) when converting from RGB to grayscale color space. I'll attach a backtrace.

2.) Converting from RGB to CMYK behaves as described through, losing the settings of the Color Adjustment Filter Layer.

Importance should probably be upped as this bug has the potential to crash Krita.
Comment 2 Emmet O'Neill 2018-09-16 04:27:46 UTC
Created attachment 114992 [details]
segfault backtrace
Comment 3 Emmet O'Neill 2018-10-10 13:12:20 UTC
After testing on Linux (git 8e19e4649445e6633a29e5586d923ede5cb0d4a4) and Windows (4.1.3), I can no longer reproduce either the crash or the buggy functionality. As such, I'll be marking this one as resolved for now.
Comment 4 Yncke 2019-04-27 13:59:26 UTC
I'm reopening this because I can reproduce that the settings of the Color Adjustment Filter layer are lost both with the released 4.1.7 appimage and the krita-4.2.0-pre-alpha-ab98e9b-x86_64 appimage on Debian Linux 9.
Comment 5 Halla Rempt 2019-05-09 11:20:45 UTC
One problem, of course, is that the rgb, cmyk or gray curves lose their meaning when the image colorspace is converted. The hsv curves should be kept, though.
Comment 6 Halla Rempt 2019-05-09 11:48:28 UTC
Okay, I tested by actually checking the filterconfig in the files, and the filter config isn't lost, it just doesn't get applied when the image is in a different colorspace than the one it was when the filter is created. 

If I:

* create a file in cmyk
* add a color adjustment filter mask
* convert the file to rgb
* save the file
* close the file
* open the file
* convert the image back to cmyk

the filtermask takes effect again.
Comment 7 Halla Rempt 2019-05-09 12:13:00 UTC
Git commit 4f816b7c1433e60d0212736b5f4bcb32483448b7 by Boudewijn Rempt.
Committed on 09/05/2019 at 12:12.
Pushed by rempt into branch 'master'.

Show a warning when editing curves created for a different colorspace

It's the best we can do now; we should label the curves, and only
reset the real color curves, and keep the virtual curves, but the
file format and the structure of the multichannel filter don't
really support that.

This breaks string freeze :-(
CCMAIL:kimageshop@kde.org
CCMAIL:kde-i18n-doc@kde.org

M  +2    -0    plugins/filters/colorsfilters/kis_multichannel_filter_base.cpp

https://invent.kde.org/kde/krita/commit/4f816b7c1433e60d0212736b5f4bcb32483448b7
Comment 8 Halla Rempt 2022-09-14 08:34:55 UTC
This is the best we can do, I'm afraid.