[gimp] app: propagate space in gimp_layer_mode_get_format
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: propagate space in gimp_layer_mode_get_format
- Date: Thu, 1 Nov 2018 01:12:08 +0000 (UTC)
commit 34376c7abf21999587648df4f39d402afe5d07ab
Author: Øyvind Kolås <pippin gimp org>
Date: Thu Nov 1 01:50:13 2018 +0100
app: propagate space in gimp_layer_mode_get_format
We were not propagating the space properly causing compositing and blending to
always happen in default/linear sRGB space.
app/operations/layer-modes/gimp-layer-modes.c | 12 ++++++------
app/operations/layer-modes/gimpoperationlayermode.c | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/app/operations/layer-modes/gimp-layer-modes.c b/app/operations/layer-modes/gimp-layer-modes.c
index 50abd060aa..784fe71187 100644
--- a/app/operations/layer-modes/gimp-layer-modes.c
+++ b/app/operations/layer-modes/gimp-layer-modes.c
@@ -1429,21 +1429,21 @@ gimp_layer_mode_get_format (GimpLayerMode mode,
*/
if (! preferred_format ||
gimp_babl_format_get_trc (preferred_format) == GIMP_TRC_LINEAR)
- return babl_format ("RGBA float");
+ return babl_format_with_space ("RGBA float", preferred_format);
else
- return babl_format ("R'G'B'A float");
+ return babl_format_with_space ("R'G'B'A float", preferred_format);
case GIMP_LAYER_COLOR_SPACE_RGB_LINEAR:
- return babl_format ("RGBA float");
+ return babl_format_with_space ("RGBA float", preferred_format);
case GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL:
- return babl_format ("R'G'B'A float");
+ return babl_format_with_space ("R'G'B'A float", preferred_format);
case GIMP_LAYER_COLOR_SPACE_LAB:
- return babl_format ("CIE Lab alpha float");
+ return babl_format_with_space ("CIE Lab alpha float", preferred_format);
}
- g_return_val_if_reached (babl_format ("RGBA float"));
+ g_return_val_if_reached (babl_format_with_space ("RGBA float", preferred_format));
}
GimpLayerCompositeRegion
diff --git a/app/operations/layer-modes/gimpoperationlayermode.c
b/app/operations/layer-modes/gimpoperationlayermode.c
index b2e679b792..3ebb2f698b 100644
--- a/app/operations/layer-modes/gimpoperationlayermode.c
+++ b/app/operations/layer-modes/gimpoperationlayermode.c
@@ -366,7 +366,7 @@ gimp_operation_layer_mode_prepare (GeglOperation *operation)
gegl_operation_set_format (operation, "input", format);
gegl_operation_set_format (operation, "output", format);
gegl_operation_set_format (operation, "aux", format);
- gegl_operation_set_format (operation, "aux2", babl_format ("Y float"));
+ gegl_operation_set_format (operation, "aux2", babl_format_with_space ("Y float", format));
}
static gboolean
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]