[gegl] saturation: propagte BablSpace
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] saturation: propagte BablSpace
- Date: Thu, 5 Jul 2018 19:59:21 +0000 (UTC)
commit 2a46633ea129cbf5db5536c2fa4a60af3f9c0e1e
Author: Øyvind Kolås <pippin gimp org>
Date: Thu Jul 5 21:57:51 2018 +0200
saturation: propagte BablSpace
operations/common/saturation.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/operations/common/saturation.c b/operations/common/saturation.c
index dd7312050..017426339 100644
--- a/operations/common/saturation.c
+++ b/operations/common/saturation.c
@@ -141,6 +141,7 @@ process_lch_alpha (GeglOperation *operation,
static void prepare (GeglOperation *operation)
{
+ const Babl *space = gegl_operation_get_source_space (operation, "input");
GeglProperties *o = GEGL_PROPERTIES (operation);
const Babl *format;
const Babl *input_format;
@@ -150,7 +151,7 @@ static void prepare (GeglOperation *operation)
input_format = gegl_operation_get_source_format (operation, "input");
if (input_format == NULL)
{
- format = babl_format ("CIE Lab alpha float");
+ format = babl_format_with_space ("CIE Lab alpha float", space);
o->user_data = process_lab_alpha;
goto out;
}
@@ -162,12 +163,12 @@ static void prepare (GeglOperation *operation)
lch_model = babl_model ("CIE LCH(ab) alpha");
if (input_model == lch_model)
{
- format = babl_format ("CIE LCH(ab) alpha float");
+ format = babl_format_with_space ("CIE LCH(ab) alpha float", space);
o->user_data = process_lch_alpha;
}
else
{
- format = babl_format ("CIE Lab alpha float");
+ format = babl_format_with_space ("CIE Lab alpha float", space);
o->user_data = process_lab_alpha;
}
}
@@ -176,12 +177,12 @@ static void prepare (GeglOperation *operation)
lch_model = babl_model ("CIE LCH(ab)");
if (input_model == lch_model)
{
- format = babl_format ("CIE LCH(ab) float");
+ format = babl_format_with_space ("CIE LCH(ab) float", space);
o->user_data = process_lch;
}
else
{
- format = babl_format ("CIE Lab float");
+ format = babl_format_with_space ("CIE Lab float", space);
o->user_data = process_lab;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]