Bug 310947

Summary: [enhancement] Filter > Adjust > "HSV adjustement" doesn't work as expected.
Product: krita Reporter: David REVOY <info>
Component: FiltersAssignee: Halla Rempt <halla>
Status: RESOLVED FIXED    
Severity: normal CC: halla
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description David REVOY 2012-11-30 20:46:38 UTC
Since I'm using mainly Krita, one feature that 's keeping frustrating me is the filter "HSV adjustement"
Filter > Adjust > "HSV adjustement"  : It's look like a dialog I'm used to call by shortcut Ctrl+U to do a lot of color correction in other apps , but even if it look totally like , it doesn't do the same job ... and thats frustrating. 

_Explanation :_
1) Here is a color picture open in Krita :) 
http://wstaw.org/m/2012/11/30/2012-11-30_screenshot_001_1.jpeg

2) If I use the HSV adjustement to turn saturation to 0 , here what's happen :
http://wstaw.org/m/2012/11/30/2012-11-30_screenshot_002_1.jpeg

3) If I compare the result with : Filter > Adjust > Saturation :
http://wstaw.org/m/2012/11/30/2012-11-30_screenshot_003.jpeg

4) If I compare to the similar classic dialog on Gimp :
http://wstaw.org/m/2012/11/30/2012-11-30_screenshot_004_1.jpeg

5) and at last, if I compare to the one in Pinta : 
http://wstaw.org/m/2012/11/30/2012-11-30_screenshot_005_1.jpeg

_Conclusion :_
Result in Krita is different, and a bit wrong for desaturating an artwork , for exemple. 
Did the problem is because it use HSV ? Should it use HSY or HSL for Lightness  ?
Should a new dialog be added  : Filter > Adjust > "HSL adjustement"  ?
Could it be named "Adjust Hue / Lightness / Saturation" as in Pinta or Gimp ( or Ps, Painter, and other 2D apps ) ? Thanks in advance !



Reproducible: Always
Comment 1 Halla Rempt 2012-12-01 09:11:08 UTC
Upgrading to bug instead of wish since the results seem to be genuinely wrong.
Comment 2 Halla Rempt 2012-12-01 14:32:14 UTC
Git commit 12737c6b353db80ca75a3ab819a5de3764a0e963 by Boudewijn Rempt.
Committed on 01/12/2012 at 12:30.
Pushed by rempt into branch 'master'.

Extend the HSV filter to include HSL and make that default

M  +1    -0    krita/image/brushengine/kis_paintop_preset.cpp
M  +4    -1    krita/plugins/colorspaces/extensions/CMakeLists.txt
M  +54   -13   krita/plugins/colorspaces/extensions/kis_hsv_adjustment.cc
M  +22   -0    krita/plugins/filters/colorsfilters/kis_hsv_adjustment_filter.cpp
M  +8    -1    krita/plugins/filters/colorsfilters/kis_hsv_adjustment_filter.h
M  +34   -7    krita/plugins/filters/colorsfilters/wdg_hsv_adjustment.ui
M  +1    -0    libs/pigment/KoColorTransformation.cpp

http://commits.kde.org/calligra/12737c6b353db80ca75a3ab819a5de3764a0e963
Comment 3 David REVOY 2012-12-03 17:38:54 UTC
Many thanks Boud ! I saw all the commit, and built on purpose for this filter, and it's dreamy to have it in Krita.

Comments about some error I noticed for the "colorize" option  :

1) When Colorize is checked , the Saturation slider turn to 0. If possible, I would prefer the slider to keep 50 ( mid ).  Hue can be 0 as it is now , Red. Perfect. 

2) Still in Colorize , the Hue range is limited to half of the possibilities of wheel : 
here an illustration of it :
- http://wstaw.org/m/2012/12/03/2012-12-03_screenshot_001_1.jpeg
- http://wstaw.org/m/2012/12/03/2012-12-03_screenshot_002.jpeg

I also understand it's still work in progress, but maybe my test can help. Thanks again.
Comment 4 Halla Rempt 2012-12-03 21:24:33 UTC
Weird... The first thing is easy to fix, but I'm not sure what's going on with the hue slider.
Comment 5 Halla Rempt 2012-12-03 21:55:06 UTC
Git commit a9ee6a554e51c3d3fdd57f644aec9bcacfaf1dce by Boudewijn Rempt.
Committed on 03/12/2012 at 22:54.
Pushed by rempt into branch 'master'.

Fix h range for colorize option

M  +6    -6    krita/plugins/colorspaces/extensions/kis_hsv_adjustment.cc
M  +1    -0    krita/plugins/filters/colorsfilters/kis_hsv_adjustment_filter.cpp

http://commits.kde.org/calligra/a9ee6a554e51c3d3fdd57f644aec9bcacfaf1dce
Comment 6 David REVOY 2012-12-04 08:29:39 UTC
Thanks Boud, it works way better this way.

Last little bug (minor) I saw : When the 'colorize' is checked , and Hue value = 360  ; it desactivate the colorization ( the color of the artwork are restored ). The value from 0 to 359 are nice by the way.
Comment 7 Halla Rempt 2012-12-04 08:58:52 UTC
I'll see what I can do about that -- it probably is an out-of-bounds error somewhere.
Comment 8 Halla Rempt 2012-12-29 09:56:34 UTC
Looks like everything works now.