[gegl] edge-neon: propagate space



commit c09d7936d8f4297470dc436249e83bdb65abc3d8
Author: Øyvind Kolås <pippin gimp org>
Date:   Fri Jul 6 00:03:02 2018 +0200

    edge-neon: propagate space

 operations/common/edge-neon.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/operations/common/edge-neon.c b/operations/common/edge-neon.c
index f542bd4e7..f92554599 100644
--- a/operations/common/edge-neon.c
+++ b/operations/common/edge-neon.c
@@ -95,9 +95,11 @@ static void      combine_to_gradient (gfloat           *dest,
 
 static void neon_prepare (GeglOperation *operation)
 {
-  //const Babl *src_format = gegl_operation_get_source_format (operation, "input");
-  gegl_operation_set_format (operation, "input", babl_format ("R'G'B'A float"));
-  gegl_operation_set_format (operation, "output", babl_format("R'G'B'A float"));
+  const Babl *space = gegl_operation_get_source_space (operation, "input");
+  const Babl *format = babl_format_with_space ("R'G'B'A float", space);
+
+  gegl_operation_set_format (operation, "input", format);
+  gegl_operation_set_format (operation, "output", format);
 }
 
 
@@ -122,7 +124,7 @@ neon_process (GeglOperation     *op,
     gdouble       vanish_pt;
 
     /* Retrieve a pointer to GeglProperties via Chant */
-    const Babl *rgba32 = babl_format("R'G'B'A float");
+    const Babl *rgba32 = gegl_operation_get_format (op, "output");
     GeglProperties *o = GEGL_PROPERTIES (op);
     gdouble      radius, amount;
     gdouble      std_dev;


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