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.
This commit is contained in:
Øyvind Kolås 2018-11-01 01:50:13 +01:00
parent c55f2308e1
commit 34376c7abf
2 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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