invert-linear.c 1.86 KB
Newer Older
1 2 3 4 5
/* 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
6
 * version 3 of the License, or (at your option) any later version.
7 8 9 10 11 12 13
 *
 * 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
14
 * License along with GEGL; if not, see <https://www.gnu.org/licenses/>.
15 16 17
 *
 * Copyright 2006 Øyvind Kolås <pippin@gimp.org>
 */
18 19 20 21 22

#include "config.h"
#include <glib/gi18n-lib.h>


23
#ifdef GEGL_PROPERTIES
24

25
   /* no properties */
26

27 28
#else

29
#define GEGL_OP_POINT_FILTER
30
#define GEGL_OP_NAME     invert_linear
31
#define GEGL_OP_C_SOURCE invert-linear.c
32

33
#include "gegl-op.h"
34

35 36
#define INVERT_GAMMA ""
#include "invert-common.h"
37

38
#include "opencl/invert-linear.cl.h"
39

40
static void
41
gegl_op_class_init (GeglOpClass *klass)
42 43 44 45 46 47 48
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *point_filter_class;

  operation_class    = GEGL_OPERATION_CLASS (klass);
  point_filter_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);

49
  operation_class->prepare     = prepare;
50
  point_filter_class->process  = process;
51 52

  gegl_operation_class_set_keys (operation_class,
53 54
    "name",        "gegl:invert-linear",
    "title",       _("Invert"),
55
    "compat-name", "gegl:invert",
56
    "categories" , "color",
57
    "reference-hash", "3fc7e35d7a5c45b9e55bc2d15890005a",
58
    "description",
59 60
       _("Invert the components (except alpha) in linear light, "
         "the result is the corresponding \"negative\" image."),
61
    "cl-source"  , invert_linear_cl_source,
62
    NULL);
63 64
}

65
#endif