RSS/Atom feed Twitter
Site is read-only, email is disabled

Gimp Plugin semi-flatten ported to Gegl op.

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

1 of 1 message available
Toggle history

Please log in to manage your subscriptions.

Gimp Plugin semi-flatten ported to Gegl op. shivani maheshwari 07 Apr 11:12
shivani maheshwari
2011-04-07 11:12:02 UTC (about 14 years ago)

Gimp Plugin semi-flatten ported to Gegl op.

Hello,

I am Shivani and have ported the gimp plugin 'semi-flatten' to Gegl op. This is in addition to the task( posted earlier to the list ) - giving the code review and algorithm description as mentioned in Gsoc tasks
list.

Kindly review the patch -

diff --git a/semi-flatten.c b/semi-flatten.c index e69de29..ff18455 100644
--- a/semi-flatten.c
+++ b/semi-flatten.c
@@ -0,0 +1,70 @@
+/* Semi-flatten plugin using gegl op + *
+ * Shivani Maheshwari
+ *
+ */
+
+#include "config.h"
+#include
+
+#ifdef GEGL_CHANT_PROPERTIES
+
+#else
+
+#define GEGL_CHANT_TYPE_POINT_FILTER +
+#define GEGL_CHANT_C_FILE "semi-flatten.c" +
+#include "gegl-chant.h"
+
+static void prepare (GeglOperation *operation) +{
+ gegl_operation_set_format (operation, "input", babl_format ("RGBA float"));
+ gegl_operation_set_format (operation, "output", babl_format ("RGBA float"));
+}
+
+static gboolean
+process (GeglOperation *op,
+ void *in_buf, + void *out_buf, + glong n_pixels, + const GeglRectangle *roi)
+{
+ GeglChantO *o = GEGL_CHANT_PROPERTIES (operation); + gfloat *GEGL_ALIGNED in_pixel;
+ gfloat *GEGL_ALIGNED out_pixel;
+ glong i;
+
+ in_pixel = in_buf;
+ out_pixel = out_buf;
+
+ for (i=0; iprepare = prepare;
+ point_filter_class->process = process; +
+ operation_class->name = "gegl:semi-flatten"; + operation_class->categories = "color"; + operation_class->description = _("Semi flattens the image"); +}
+
+#endif