[gegl] mirrors: propagate BablSpace



commit 50a4d0e6838295be4c4671a11c9712e840b5451b
Author: Øyvind Kolås <pippin gimp org>
Date:   Thu Jul 5 21:19:31 2018 +0200

    mirrors: propagate BablSpace

 operations/common/mirrors.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/operations/common/mirrors.c b/operations/common/mirrors.c
index 723230ba1..27542fce2 100644
--- a/operations/common/mirrors.c
+++ b/operations/common/mirrors.c
@@ -372,8 +372,9 @@ get_required_for_output (GeglOperation       *operation,
 static void
 prepare (GeglOperation *operation)
 {
-  gegl_operation_set_format (operation, "input", babl_format ("RaGaBaA float"));
-  gegl_operation_set_format (operation, "output", babl_format ("RaGaBaA float"));
+  const Babl *space = gegl_operation_get_source_space (operation, "input");
+  gegl_operation_set_format (operation, "input", babl_format_with_space ("RaGaBaA float", space));
+  gegl_operation_set_format (operation, "output", babl_format_with_space ("RaGaBaA float", space));
 }
 
 /* Perform the specified operation.
@@ -388,7 +389,7 @@ process (GeglOperation       *operation,
   GeglProperties *o            = GEGL_PROPERTIES (operation);
   GeglRectangle   boundary     = gegl_operation_get_bounding_box (operation);
   GeglRectangle   eff_boundary = get_effective_area (operation);
-  const Babl     *format       = babl_format ("RaGaBaA float");
+  const Babl     *format       = gegl_operation_get_format (operation, "output");
 
 #ifdef DO_NOT_USE_BUFFER_SAMPLE
  g_warning ("NOT USING BUFFER SAMPLE!");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]