[gegl] gblur-1d: handle cmyk formats with generic blur handler



commit 3886c859a8c84174e242e8300bbcce4763caaedb
Author: Øyvind Kolås <pippin gimp org>
Date:   Fri Nov 9 15:49:04 2018 +0100

    gblur-1d: handle cmyk formats with generic blur handler

 operations/common/gblur-1d.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/operations/common/gblur-1d.c b/operations/common/gblur-1d.c
index 9ffc5c39f..16f0cd751 100644
--- a/operations/common/gblur-1d.c
+++ b/operations/common/gblur-1d.c
@@ -72,7 +72,6 @@ property_boolean (clip_extent, _("Clip to the input extent"), TRUE)
 
 #include "gegl-op.h"
 #include <math.h>
-#include <stdio.h>
 
 
 /**********************************************
@@ -368,7 +367,6 @@ iir_young_blur_1D_generic (gfloat           *buf,
                            GeglAbyssPolicy   policy)
 {
   gint    i, j, c;
-
   for (i = 0; i < 3; i++, tmp += components)
     {
       for (c = 0; c < components; c++)
@@ -1032,7 +1030,6 @@ gegl_gblur_1d_prepare (GeglOperation *operation)
   GeglProperties *o = GEGL_PROPERTIES (operation);
   const Babl *src_format = gegl_operation_get_source_format (operation, "input");
   const char *format     = "RaGaBaA float";
-
   o->user_data = iir_young_blur_1D_rgbA;
 
   /*
@@ -1060,9 +1057,18 @@ gegl_gblur_1d_prepare (GeglOperation *operation)
           format = "YaA float";
           o->user_data = iir_young_blur_1D_yA;
         }
+      else if (babl_model_is (model, "cmyk"))
+        {
+          format = "cmyk float";
+          o->user_data = iir_young_blur_1D_generic;
+        }
+      else if (babl_model_is (model, "cmykA") ||
+               babl_model_is (model, "camayakaA"))
+        {
+          format = "camayakaA float";
+          o->user_data = iir_young_blur_1D_generic;
+        }
     }
-  if (0)
-    o->user_data = iir_young_blur_1D_generic;
 
   gegl_operation_set_format (operation, "input", babl_format_with_space (format, space));
   gegl_operation_set_format (operation, "output", babl_format_with_space (format, space));


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