1 /* This file is an image processing operation for GEGL
3 * GEGL is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 3 of the License, or (at your option) any later version.
8 * GEGL is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with GEGL; if not, see <https://www.gnu.org/licenses/>.
16 * Copyright 2006 Øyvind Kolås <pippin@gimp.org>
20 #include <glib/gi18n-lib.h>
23 #ifdef GEGL_PROPERTIES
29 #define GEGL_OP_POINT_FILTER
30 #define GEGL_OP_NAME invert_linear
31 #define GEGL_OP_C_SOURCE invert-linear.c
35 #define INVERT_GAMMA ""
36 #include "invert-common.h"
38 #include "opencl/invert-linear.cl.h"
41 gegl_op_class_init (GeglOpClass
*klass
)
43 GeglOperationClass
*operation_class
;
44 GeglOperationPointFilterClass
*point_filter_class
;
46 operation_class
= GEGL_OPERATION_CLASS (klass
);
47 point_filter_class
= GEGL_OPERATION_POINT_FILTER_CLASS (klass
);
49 operation_class
->prepare
= prepare
;
50 point_filter_class
->process
= process
;
52 gegl_operation_class_set_keys (operation_class
,
53 "name", "gegl:invert-linear",
55 "compat-name", "gegl:invert",
56 "categories" , "color",
57 "reference-hash", "3fc7e35d7a5c45b9e55bc2d15890005a",
59 _("Invert the components (except alpha) in linear light, "
60 "the result is the corresponding \"negative\" image."),
61 "cl-source" , invert_linear_cl_source
,