app: default Curves and Levels to working in linear space.

This was always planned, as outlined in commit 54d3beab9c. As a stroke
of luck, even though this default change had never happened, it turned
out that these 2 filters were always run in linear, when called from the
API (cf. #15681).

This is now fixed, and as a consequence, setting the default TRC to
linear would make sure that any script which was calling "gimp:levels"
with default "trc" would still run exactly the same (and if the prop was
set, it was broken anyway). As for "gimp:curves", it could not even have
been used anyway, because of the lack of the GimpCurve type in libgimp.
Therefore, plug-in API-wise, we can consider that changing the default
is actually the less breakage, which is good news as it fits our plans!

As for XCF storing of filters, since we are storing all the properties
anyway, it doesn't break XCF files with these filters either.
This commit is contained in:
Jehan 2026-01-30 23:13:19 +01:00
parent f5018b995c
commit 85e919e9ce
2 changed files with 4 additions and 4 deletions

View file

@ -105,7 +105,7 @@ gimp_curves_config_class_init (GimpCurvesConfigClass *klass)
_("Tone Reproduction Curve"),
_("Work on linear or perceptual RGB, or following the image's TRC"),
GIMP_TYPE_TRC_TYPE,
GIMP_TRC_NON_LINEAR, 0);
GIMP_TRC_LINEAR, 0);
/* "linear" is a compat property initially kept for compatibility
* reason, in particular for config parsing. It's not needed anymore
@ -117,7 +117,7 @@ gimp_curves_config_class_init (GimpCurvesConfigClass *klass)
"linear",
_("Linear"),
_("Work on linear RGB (this property is ignored; use \"trc\" instead)"),
FALSE, 0);
TRUE, 0);
GIMP_CONFIG_PROP_ENUM (object_class, PROP_CHANNEL,
"channel",

View file

@ -111,7 +111,7 @@ gimp_levels_config_class_init (GimpLevelsConfigClass *klass)
_("Tone Reproduction Curve"),
_("Work on linear or perceptual RGB, or following the image's TRC"),
GIMP_TYPE_TRC_TYPE,
GIMP_TRC_NON_LINEAR, 0);
GIMP_TRC_LINEAR, 0);
/* "linear" is a compat property initially kept for compatibility
* reason, in particular for config parsing. It's not needed anymore
@ -123,7 +123,7 @@ gimp_levels_config_class_init (GimpLevelsConfigClass *klass)
"linear",
_("Linear"),
_("Work on linear RGB (this property is ignored; use \"trc\" instead)"),
FALSE, 0);
TRUE, 0);
GIMP_CONFIG_PROP_ENUM (object_class, PROP_CHANNEL,
"channel",