[gegl] ops/value-invert: operate in sRGB gamma space



commit e822fd181b636ae205c0d3ddb14bc90a5c2ab0c5
Author: Ãyvind KolÃs <pippin gimp org>
Date:   Mon Apr 2 01:19:41 2012 +0100

    ops/value-invert: operate in sRGB gamma space

 operations/common/value-invert.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/operations/common/value-invert.c b/operations/common/value-invert.c
index 34d59bc..b9b4be5 100644
--- a/operations/common/value-invert.c
+++ b/operations/common/value-invert.c
@@ -16,6 +16,12 @@
  * Copyright 2007 Mukund Sivaraman <muks mukund org>
  */
 
+/* XXX
+ * This plug-in isn't really useful apart for compatibility with GIMP
+ * scripts, operating with HSV as a color model for filters isn't really
+ * useful.
+ */
+
 /*
  * The plug-in only does v = 1.0 - v; for each pixel in the image, or
  * each entry in the colormap depending upon the type of image, where 'v'
@@ -46,6 +52,13 @@
 
 #include "gegl-chant.h"
 
+static void
+prepare (GeglOperation *operation)
+{
+  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"));
+}
+
 static gboolean
 process (GeglOperation       *op,
          void                *in_buf,
@@ -207,6 +220,7 @@ gegl_chant_class_init (GeglChantClass *klass)
   point_filter_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
 
   point_filter_class->process = process;
+  operation_class->prepare = prepare;
   point_filter_class->cl_process = cl_process;
 
   operation_class->opencl_support = TRUE;



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