Bug 348267

Summary: Smudge brush color problem
Product: [Applications] krita Reporter: bartosz.styperek
Component: Brush enginesAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: griffinvalley, halla, hhielscher
Priority: NOR    
Version: 2.9.4   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Kra file showing an 8bit and 16bit layer with the same colour smudged over it.
The brush used to make that file.

Description bartosz.styperek 2015-05-26 20:46:26 UTC
Try using - Block_wet_tilt   brush and paint strokes with increasing opacity.
This is what happens 
https://forum.kde.org/viewtopic.php?f=276&t=126575#p335538
There is unwanted jitter in hue and saturation


Reproducible: Always
Comment 1 wolthera 2015-05-26 22:04:40 UTC
Created attachment 92839 [details]
Kra file showing an 8bit and 16bit layer with the same colour smudged over it.

Can confirm this bug, it's a rounding error, but the question is where we make it.
Comment 2 wolthera 2015-05-26 22:05:29 UTC
Created attachment 92840 [details]
The brush used to make that file.
Comment 3 Dmitry Kazakov 2018-01-10 13:09:28 UTC
Git commit cc19c756f1be1d078ea50369de0bbbd6fb61698c by Dmitry Kazakov.
Committed on 10/01/2018 at 12:42.
Pushed by dkazakov into branch 'master'.

2nd try of fixing color fluctuations in colorsmudge-dulling brushes

Now the colorsmudge brush does all the blending in the high bit-depth
colorspace. The patch introduces a special wrapper
(KisPrecisePaintDeviceWrapper) that ensures a proper color space is used
when needed. See the apidox in KisPrecisePaintDeviceWrapper.h.

NOTE: this patch fixes **both** dulling and smearing modes!

Test Plan:
Needs to be tested:
1) Colorsmudge brushes in Dulling mode with Color Rate option enabled
2) Smudge Radius enabled or disabled: both should work correctly
3) Opacity option should work correctly
4) Overlay mode?

Reviewers: #krita
Differential Revision: https://phabricator.kde.org/D9686

M  +1    -0    libs/image/CMakeLists.txt
A  +165  -0    libs/image/KisPrecisePaintDeviceWrapper.cpp     [License: GPL (v2+)]
A  +141  -0    libs/image/KisPrecisePaintDeviceWrapper.h     [License: GPL (v2+)]
M  +1    -1    libs/image/kis_paint_device.cc
M  +47   -0    libs/image/kis_painter.cc
M  +15   -2    libs/image/kis_painter.h
M  +117  -0    libs/pigment/KoColor.cpp
M  +45   -1    libs/pigment/KoColor.h
M  +69   -32   plugins/paintops/colorsmudge/kis_colorsmudgeop.cpp
M  +10   -3    plugins/paintops/colorsmudge/kis_colorsmudgeop.h
M  +20   -11   plugins/paintops/colorsmudge/kis_smudge_radius_option.cpp
M  +3    -1    plugins/paintops/colorsmudge/kis_smudge_radius_option.h

https://commits.kde.org/krita/cc19c756f1be1d078ea50369de0bbbd6fb61698c