https://bugs.kde.org/show_bug.cgi?id=472343

--- Comment #2 from Deif Lou <gin...@gmail.com> ---
Hi varkatope, I made a merge request that tries to handle this. I have to say
that similar issue happens also on other filters... but I only fixed this one
for now.
Please try the changes by downloading the linux artifact for the mr
(https://invent.kde.org/graphics/krita/-/jobs/1065247/artifacts/download) and
let me know if it solves the issue.
When I improved the levels filter I also changed the properties to better
include the new ones. This is the structure in xml form:

* levels curve param follows this format:
"input_black_point;input_white_point;input_gamma;output_black_point;output_white_point"
A string with the 5 values. The input/output black/white points have a [0, 1]
range, not [0, 255].
* For backwards compatibility, the "blackvalue" etc. values are also saved.
Those contain the same values as the lightness mode levels.
* The new xml form is:
        <params version=2>
                <param name="mode">lightness</param>
                <param name="histogram_mode">logarithmic</param>
                <param name="lightness">0;1;0.4;0;1</param>
                <param name="number_of_channels">3</param>
                <param name="channel_0">0;1;1;0;1</param>
                <param name="channel_1">0.2;0.8;1.2;0.25;0.75</param>
                <param name="channel_2">0;1;0.6;0;1</param>

                <param type="internal" name="blackvalue">0</param>
                <param type="internal" name="whitevalue">255</param>
                <param type="internal" name="gammavalue">1</param>
                <param type="internal" name="outblackvalue">0</param>
                <param type="internal" name="outwhitevalue">255</param>
        </params>

* "number_of_channels" and "channel_*" change depending on the color space used
and start at 0. "mode" can be "lightness" or "channels". "histogram_mode" can
be "linear" or "logarithmic", although that is used for the gui only.
* You can set the properties from python as you did in your first message now
using the same property names and values as the xml. You can set the whole
levels for the lightness mode for example with `setProperty("lightness",
"0;1;0.5;0;1")` or similar.
* For the the old values ("blackvalue", etc.) are also stored. If you change
one of thes then the "lightness" option is also changed. Conversely, if you
change the "lightness" option then the old values are also changed.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to