[gegl/soc-2013-n-point-deformation: 1/28] npd branch created
- From: Marek Dvoroznak <dvoromar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/soc-2013-n-point-deformation: 1/28] npd branch created
- Date: Fri, 6 Dec 2013 05:01:11 +0000 (UTC)
commit 4e56a991c717d56fa49a14e5e0014334bad9b28e
Author: Marek Dvoroznak <dvoromar gmail com>
Date: Wed Jun 26 23:32:22 2013 +0200
npd branch created
operations/external/npd.c | 81 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 81 insertions(+), 0 deletions(-)
---
diff --git a/operations/external/npd.c b/operations/external/npd.c
new file mode 100644
index 0000000..30680bf
--- /dev/null
+++ b/operations/external/npd.c
@@ -0,0 +1,81 @@
+/* This file is an image processing operation for GEGL
+ *
+ * GEGL is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * GEGL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
+ *
+ * Copyright (C) 2013 Marek Dvoroznak <dvoromar gmail com>
+ */
+
+#include "config.h"
+#include <glib/gi18n-lib.h>
+
+#ifdef GEGL_CHANT_PROPERTIES
+
+#else
+
+#define GEGL_CHANT_TYPE_FILTER
+#define GEGL_CHANT_C_FILE "npd.c"
+
+#include "gegl-chant.h"
+#include <stdio.h>
+#include <math.h>
+#include "npd/npd_common.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 *operation,
+ GeglBuffer *input,
+ GeglBuffer *output,
+ const GeglRectangle *result,
+ gint level)
+{
+ GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
+ const Babl *format = babl_format ("RGBA float");
+
+ NPDModel model;
+ npd_init_model(&model);
+ npd_destroy_model(&model);
+
+ printf("\n\nDONE!\n");
+
+ return TRUE;
+}
+
+static void
+gegl_chant_class_init (GeglChantClass *klass)
+{
+ GeglOperationClass *operation_class;
+ GeglOperationFilterClass *filter_class;
+
+ operation_class = GEGL_OPERATION_CLASS (klass);
+ filter_class = GEGL_OPERATION_FILTER_CLASS (klass);
+
+ filter_class->process = process;
+ operation_class->prepare = prepare;
+
+ gegl_operation_class_set_keys (operation_class,
+ "categories" , "transform",
+ "name" , "gegl:npd",
+ "description" , _("Performs n-point image deformation"),
+ NULL);
+}
+
+#endif
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]