Bug 436257 - RGBA lightness brushes became darker in Krita 5.0 prealpha
Summary: RGBA lightness brushes became darker in Krita 5.0 prealpha
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: regression, release_blocker
Depends on:
Blocks:
 
Reported: 2021-04-27 07:09 UTC by Dmitry Kazakov
Modified: 2021-05-11 11:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Illustration of the problem (859.46 KB, image/jpeg)
2021-04-27 07:09 UTC, Dmitry Kazakov
Details

Note You need to log in before you can comment on or make changes to this bug.
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