From ae2c30ad0e759cef3effdcbbc0b6eb4ffade0eb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Fri, 6 Jul 2018 14:50:08 +0200 Subject: [PATCH] app: gimp:flood propagate babl space --- app/operations/gimpoperationflood.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/operations/gimpoperationflood.c b/app/operations/gimpoperationflood.c index 386876cf54..a434cc31b9 100644 --- a/app/operations/gimpoperationflood.c +++ b/app/operations/gimpoperationflood.c @@ -258,8 +258,9 @@ gimp_operation_flood_init (GimpOperationFlood *self) static void gimp_operation_flood_prepare (GeglOperation *operation) { - gegl_operation_set_format (operation, "input", babl_format ("Y float")); - gegl_operation_set_format (operation, "output", babl_format ("Y float")); + const Babl *space = gegl_operation_get_source_space (operation, "input"); + gegl_operation_set_format (operation, "input", babl_format_with_space ("Y float", space)); + gegl_operation_set_format (operation, "output", babl_format_with_space ("Y float", space)); } static GeglRectangle @@ -993,8 +994,8 @@ gimp_operation_flood_process (GeglOperation *operation, const GeglRectangle *roi, gint level) { - const Babl *input_format = babl_format ("Y float"); - const Babl *output_format = babl_format ("Y float"); + const Babl *input_format = gegl_operation_get_format (operation, "input"); + const Babl *output_format = gegl_operation_get_format (operation, "output"); GeglColor *color; gint max_size; GimpOperationFloodContext ctx;