Bug 436257

Summary: RGBA lightness brushes became darker in Krita 5.0 prealpha
Product: [Applications] krita Reporter: Dmitry Kazakov <dimula73>
Component: Brush enginesAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: normal CC: halla
Priority: NOR Keywords: regression, release_blocker
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In:
Attachments: Illustration of the problem

Description Dmitry Kazakov 2021-04-27 07:09:32 UTC
Created attachment 137953 [details]
Illustration of the problem

It is a regression in master, "RGBA_01_Thick-Dry" brush preset started to paint darker color. The same preset in 4.4 branch paints correctly. See attached screenshot.

Git-sha1: e0c6c0c223bdf0c03c538790c6938a72ed435d6e
Comment 1 Halla Rempt 2021-04-27 07:39:06 UTC
I think you'll have to take this bug yourself...
Comment 2 Bug Janitor Service 2021-04-29 08:37:30 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/828
Comment 3 Dmitry Kazakov 2021-05-11 11:56:14 UTC
Git commit f2b5a0aef84b13db86a03e59801441905b34a7f7 by Dmitry Kazakov.
Committed on 11/05/2021 at 11:52.
Pushed by dkazakov into branch 'master'.

Fix RGBA brushes created in Krita 4.4 becoming darker in Krita 5.0

In Krita 4.x releases there was a bug that caused lightness
adjustments to be applied to the brush **twice**. It happened
due to the fact that copy-ctor called brushTipImage() virtual
method instead of just copying the image itself.

In Krita 5 we should open these brushes in somehwat the same way.
The problem is that we cannot convert the numbers precisely, because
after applying a piecewice-linear function twice we get a
quadratic function. So we fall-back to a blunt parameters scaling,
which gives result that is just "good enough".

M  +1    -0    libs/brush/KisColorfulBrush.cpp
M  +26   -4    libs/brush/kis_predefined_brush_factory.cpp

https://invent.kde.org/graphics/krita/commit/f2b5a0aef84b13db86a03e59801441905b34a7f7