Bug 329327 - Result of the Desaturate filter is slightly colored
Summary: Result of the Desaturate filter is slightly colored
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: Filters (show other bugs)
Version: 2.7.5
Platform: unspecified Linux
: NOR minor
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-28 17:28 UTC by omiya
Modified: 2013-12-28 21:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test image created in RGB, 8 bits/channel, sRGB built-in. (33.99 KB, image/png)
2013-12-28 17:31 UTC, omiya
Details

Note You need to log in before you can comment on or make changes to this bug.
Description omiya 2013-12-28 17:28:25 UTC
Result of the Desaturate filter (Filter -> Adjust -> Desaturate) is slightly (around 2%) colored. This seems to occur regardless of the color mode or depth.

Reproducible: Always

Steps to Reproduce:
1. Open/create a colored image.
2. Apply the Desaturate Filter.
Actual Results:  
The result image is slightly colored.

Expected Results:  
The result image is complete grayscale just as converted via the Image Properties dialog (Image -> Properties...) or the Convert Layer Type dialog (Layer -> Convert Layer Type...) .
Comment 1 omiya 2013-12-28 17:31:18 UTC
Created attachment 84307 [details]
Test image created in RGB, 8 bits/channel, sRGB built-in.
Comment 2 Halla Rempt 2013-12-28 19:05:43 UTC
Yes, I can confirm the effect. The code is pretty old, dating back to 2005 and nobody has noticed an issue before...
Comment 3 Halla Rempt 2013-12-28 21:01:36 UTC
Git commit 0d6d91d7a120e2eef32f522d970d6392888c09af by Boudewijn Rempt.
Committed on 28/12/2013 at 20:59.
Pushed by rempt into branch 'calligra/2.8'.

There are several ways to do desaturation, so create a
kis_desature_adjusment color adjustment that allows to specify the type
of desaturation.

This replaces the old desat color adjusment that used a Lab-based lut
which didn't give correct results.

M  +0    -5    krita/image/filter/kis_filter.cc
M  +0    -2    krita/image/filter/kis_filter.h
M  +10   -9    krita/plugins/colorspaces/extensions/CMakeLists.txt
M  +3    -0    krita/plugins/colorspaces/extensions/extensions_plugin.cc
A  +176  -0    krita/plugins/colorspaces/extensions/kis_desaturate_adjustment.cpp     [License: LGPL (v2)]
A  +35   -0    krita/plugins/colorspaces/extensions/kis_desaturate_adjustment.h     [License: LGPL (v2)]
M  +3    -1    krita/plugins/filters/colorsfilters/CMakeLists.txt
M  +9    -37   krita/plugins/filters/colorsfilters/colorsfilters.cpp
M  +0    -15   krita/plugins/filters/colorsfilters/colorsfilters.h
M  +0    -6    krita/plugins/filters/colorsfilters/kis_brightness_contrast_filter.cpp
M  +0    -2    krita/plugins/filters/colorsfilters/kis_brightness_contrast_filter.h
A  +122  -0    krita/plugins/filters/colorsfilters/kis_desaturate_filter.cpp     [License: GPL (v2+)]
C  +30   -31   krita/plugins/filters/colorsfilters/kis_desaturate_filter.h [from: krita/plugins/filters/colorsfilters/colorsfilters.h - 061% similarity]
M  +0    -2    krita/plugins/filters/colorsfilters/kis_hsv_adjustment_filter.h
A  +64   -0    krita/plugins/filters/colorsfilters/wdg_desaturate.ui
M  +0    -6    krita/plugins/filters/levelfilter/kis_level_filter.cpp
M  +1    -2    krita/plugins/filters/levelfilter/kis_level_filter.h
M  +1    -2    krita/ui/kis_filter_manager.cc
M  +0    -6    libs/pigment/KoColorSpace.h
M  +1    -4    libs/pigment/colorspaces/KoAlphaColorSpace.h
M  +0    -75   plugins/colorengines/lcms2/LcmsColorSpace.h

http://commits.kde.org/calligra/0d6d91d7a120e2eef32f522d970d6392888c09af
Comment 4 Halla Rempt 2013-12-28 21:01:52 UTC
Git commit 21a3de74d3ae5ee6b6f93865aa36edc5bc8d32e7 by Boudewijn Rempt.
Committed on 28/12/2013 at 20:59.
Pushed by rempt into branch 'master'.

There are several ways to do desaturation, so create a
kis_desature_adjusment color adjustment that allows to specify the type
of desaturation.

This replaces the old desat color adjusment that used a Lab-based lut
which didn't give correct results.

M  +0    -5    krita/image/filter/kis_filter.cc
M  +0    -2    krita/image/filter/kis_filter.h
M  +10   -9    krita/plugins/colorspaces/extensions/CMakeLists.txt
M  +3    -0    krita/plugins/colorspaces/extensions/extensions_plugin.cc
A  +176  -0    krita/plugins/colorspaces/extensions/kis_desaturate_adjustment.cpp     [License: LGPL (v2)]
A  +35   -0    krita/plugins/colorspaces/extensions/kis_desaturate_adjustment.h     [License: LGPL (v2)]
M  +3    -1    krita/plugins/filters/colorsfilters/CMakeLists.txt
M  +9    -37   krita/plugins/filters/colorsfilters/colorsfilters.cpp
M  +0    -15   krita/plugins/filters/colorsfilters/colorsfilters.h
M  +0    -6    krita/plugins/filters/colorsfilters/kis_brightness_contrast_filter.cpp
M  +0    -2    krita/plugins/filters/colorsfilters/kis_brightness_contrast_filter.h
A  +122  -0    krita/plugins/filters/colorsfilters/kis_desaturate_filter.cpp     [License: GPL (v2+)]
C  +30   -31   krita/plugins/filters/colorsfilters/kis_desaturate_filter.h [from: krita/plugins/filters/colorsfilters/colorsfilters.h - 061% similarity]
M  +0    -2    krita/plugins/filters/colorsfilters/kis_hsv_adjustment_filter.h
A  +64   -0    krita/plugins/filters/colorsfilters/wdg_desaturate.ui
M  +0    -6    krita/plugins/filters/levelfilter/kis_level_filter.cpp
M  +1    -2    krita/plugins/filters/levelfilter/kis_level_filter.h
M  +1    -2    krita/ui/kis_filter_manager.cc
M  +0    -6    libs/pigment/KoColorSpace.h
M  +1    -4    libs/pigment/colorspaces/KoAlphaColorSpace.h
M  +0    -75   plugins/colorengines/lcms2/LcmsColorSpace.h

http://commits.kde.org/calligra/21a3de74d3ae5ee6b6f93865aa36edc5bc8d32e7