static void
gimp_operation_desaturate_class_init (GimpOperationDesaturateClass *klass)
{
  GObjectClass                  *object_class    = G_OBJECT_CLASS (klass);
  GeglOperationClass            *operation_class = GEGL_OPERATION_CLASS (klass);
  GeglOperationPointFilterClass *point_class     = GEGL_OPERATION_POINT_FILTER_CLASS (klass);

  object_class->set_property = gimp_operation_desaturate_set_property;
  object_class->get_property = gimp_operation_desaturate_get_property;

  operation_class->prepare   = gimp_operation_desaturate_prepare;

  point_class->process       = gimp_operation_desaturate_process;

  gegl_operation_class_set_keys (operation_class,
                                 "name",        "gimp:desaturate",
                                 "categories",  "color",
                                 "description", _("Turn colors into shades of gray"),
                                 NULL);

  GIMP_CONFIG_PROP_ENUM (object_class, PROP_MODE,
                         "mode",
                         _("Mode"),
                         _("Choose shade of gray based on"),
                         GIMP_TYPE_DESATURATE_MODE,
                         GIMP_DESATURATE_LIGHTNESS,
                         GIMP_PARAM_STATIC_STRINGS);
}
static void
gimp_operation_hue_saturation_class_init (GimpOperationHueSaturationClass *klass)
{
  GObjectClass                  *object_class    = G_OBJECT_CLASS (klass);
  GeglOperationClass            *operation_class = GEGL_OPERATION_CLASS (klass);
  GeglOperationPointFilterClass *point_class     = GEGL_OPERATION_POINT_FILTER_CLASS (klass);

  object_class->set_property   = gimp_operation_point_filter_set_property;
  object_class->get_property   = gimp_operation_point_filter_get_property;

  gegl_operation_class_set_keys (operation_class,
                                 "name",        "gimp:hue-saturation",
                                 "categories",  "color",
                                 "description", "GIMP Hue-Saturation operation",
                                 NULL);

  point_class->process = gimp_operation_hue_saturation_process;

  g_object_class_install_property (object_class,
                                   GIMP_OPERATION_POINT_FILTER_PROP_CONFIG,
                                   g_param_spec_object ("config",
                                                        "Config",
                                                        "The config object",
                                                        GIMP_TYPE_HUE_SATURATION_CONFIG,
                                                        G_PARAM_READWRITE |
                                                        G_PARAM_CONSTRUCT));
}
static void
gimp_operation_brightness_contrast_class_init (GimpOperationBrightnessContrastClass *klass)
{
    GObjectClass                  *object_class    = G_OBJECT_CLASS (klass);
    GeglOperationClass            *operation_class = GEGL_OPERATION_CLASS (klass);
    GeglOperationPointFilterClass *point_class     = GEGL_OPERATION_POINT_FILTER_CLASS (klass);

    object_class->set_property   = gimp_operation_point_filter_set_property;
    object_class->get_property   = gimp_operation_point_filter_get_property;

    gegl_operation_class_set_keys (operation_class,
                                   "name"       , "gimp:brightness-contrast",
                                   "categories" , "color",
                                   "description", "GIMP Brightness-Contrast operation",
                                   NULL);

    point_class->process         = gimp_operation_brightness_contrast_process;

    g_object_class_install_property (object_class,
                                     GIMP_OPERATION_POINT_FILTER_PROP_CONFIG,
                                     g_param_spec_object ("config",
                                             "Config",
                                             "The config object",
                                             GIMP_TYPE_BRIGHTNESS_CONTRAST_CONFIG,
                                             G_PARAM_READWRITE |
                                             G_PARAM_CONSTRUCT));
}
static void
gimp_operation_posterize_class_init (GimpOperationPosterizeClass *klass)
{
  GObjectClass                  *object_class    = G_OBJECT_CLASS (klass);
  GeglOperationClass            *operation_class = GEGL_OPERATION_CLASS (klass);
  GeglOperationPointFilterClass *point_class     = GEGL_OPERATION_POINT_FILTER_CLASS (klass);

  object_class->set_property = gimp_operation_posterize_set_property;
  object_class->get_property = gimp_operation_posterize_get_property;

  point_class->process       = gimp_operation_posterize_process;

  gegl_operation_class_set_keys (operation_class,
                                 "name",        "gimp:posterize",
                                 "categories",  "color",
                                 "description", _("Reduce to a limited set of colors"),
                                 NULL);

  GIMP_CONFIG_PROP_INT (object_class, PROP_LEVELS,
                        "levels",
                        _("Posterize levels"),
                        NULL,
                        2, 256, 3,
                        GIMP_PARAM_STATIC_STRINGS);
}
static void
gimp_operation_posterize_class_init (GimpOperationPosterizeClass *klass)
{
  GObjectClass                  *object_class    = G_OBJECT_CLASS (klass);
  GeglOperationClass            *operation_class = GEGL_OPERATION_CLASS (klass);
  GeglOperationPointFilterClass *point_class     = GEGL_OPERATION_POINT_FILTER_CLASS (klass);

  object_class->set_property   = gimp_operation_point_filter_set_property;
  object_class->get_property   = gimp_operation_point_filter_get_property;

  operation_class->name        = "gimp-posterize";
  operation_class->categories  = "color";
  operation_class->description = "GIMP Posterize operation";

  point_class->process         = gimp_operation_posterize_process;

  g_object_class_install_property (object_class,
                                   GIMP_OPERATION_POINT_FILTER_PROP_CONFIG,
                                   g_param_spec_object ("config",
                                                        "Config",
                                                        "The config object",
                                                        GIMP_TYPE_POSTERIZE_CONFIG,
                                                        G_PARAM_READWRITE |
                                                        G_PARAM_CONSTRUCT));
}
示例#6
0
static void gegl_chant_class_init(GeglChantClass *klass)
{
  GeglOperationClass *operation_class;
  GeglOperationPointFilterClass *point_filter_class;

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

  point_filter_class->process = process;
  operation_class->prepare = prepare;

  operation_class->name = "gegl:dt-gamma";
  operation_class->categories = "compositors:math";
  operation_class->description = _("Linear/Gamma conversion curve.");
}
示例#7
0
static void
gegl_chant_class_init (GeglChantClass *klass)
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *point_filter_class;

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

  operation_class->prepare = prepare;
  point_filter_class->process = process;

  operation_class->name        = "gegl:max-rgb";
  operation_class->categories  = "color";
  operation_class->description = _("Reduce image to pure red, green, and blue");
}
示例#8
0
static void
gegl_op_class_init (GeglOpClass *klass)
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *filter_class;
  gchar                         *composition =
    "<?xml version='1.0' encoding='UTF-8'?>"
    "<gegl>"
    "<node operation='svg:dst-over'>"
    "  <node operation='gegl:crop'>"
    "    <params>"
    "      <param name='width'>200.0</param>"
    "      <param name='height'>200.0</param>"
    "    </params>"
    "  </node>"
    "  <node operation='gegl:checkerboard'>"
    "    <params><param name='color1'>rgb(0.5, 0.5, 0.5)</param></params>"
    "  </node>"
    "</node>"
    "<node operation='gegl:color-to-alpha'>"
    "</node>"
    "<node operation='gegl:load'>"
    "  <params>"
    "    <param name='path'>standard-input.png</param>"
    "  </params>"
    "</node>"
    "</gegl>";

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

  filter_class->process    = process;
  filter_class->cl_process = cl_process;

  operation_class->prepare = prepare;
  operation_class->opencl_support = TRUE;

  gegl_operation_class_set_keys (operation_class,
    "name",        "gegl:color-to-alpha",
    "title",       _("Color to Alpha"),
    "categories",  "color",
    "license",     "GPL3+",
    "reference-hash", "f110613097308e0fe96ac29f54ca4c2e",
    "description", _("Convert a specified color to transparency, works best with white."),
    "reference-composition", composition,
    NULL);
}
示例#9
0
static void
gegl_chant_class_init (GeglChantClass *klass)
{
    GeglOperationClass            *operation_class;
    GeglOperationPointFilterClass *point_filter_class;

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

    point_filter_class->process = process;
    operation_class->prepare = prepare;

    operation_class->name        = "gegl:whitebalance";
    operation_class->categories  = "color";
    operation_class->description =
        _("Allows changing the whitepoint and blackpoint of an image.");
}
示例#10
0
static void
gegl_chant_class_init (GeglChantClass *klass)
{
    GeglOperationClass            *operation_class;
    GeglOperationPointFilterClass *point_filter_class;

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

    point_filter_class->process = process;
    operation_class->prepare = prepare;

    operation_class->name        = "gegl:svg-luminancetoalpha";
    operation_class->categories  = "compositors:svgfilter";
    operation_class->description =
        _("SVG color matrix operation svg_luminancetoalpha");
}
示例#11
0
static void
gegl_chant_class_init (GeglChantClass *klass)
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *point_filter_class;

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

  point_filter_class->process = process;

  gegl_operation_class_set_keys (operation_class,
    "name"        , "gegl:unpremul",
    "categories"  , "color",
    "description" , "Unpremultiplies a buffer that contains pre-multiplied colors (but is marked as not having it)",
    NULL);
}
示例#12
0
static void
gegl_chant_class_init (GeglChantClass *klass)
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *point_filter_class;

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

  point_filter_class->process = process;

  operation_class->name        = "gegl:posterize";
  operation_class->categories  = "color";
  operation_class->description =
     _("Reduces the number of levels in each color component of the image.");
       
}
示例#13
0
static void
gegl_chant_class_init (GeglChantClass *klass)
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *point_filter_class;

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

  operation_class->prepare    = prepare;
  point_filter_class->process = process;

  gegl_operation_class_set_keys (operation_class,
    "name",        "gegl:noise-cie-lch",
    "categories",  "noise",
    "description", _("Randomize lightness, chroma and hue independently"),
    NULL);
}
示例#14
0
static void
gegl_op_class_init (GeglOpClass *klass)
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *point_filter_class;

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

  point_filter_class->process = process;
  operation_class->prepare = prepare;

  gegl_operation_class_set_keys (operation_class,
    "name"       , "gegl:svg-huerotate",
    "categories" , "compositors:svgfilter",
    "description", _("SVG color matrix operation svg_huerotate"),
    NULL);
}
示例#15
0
static void
gegl_chant_class_init (GeglChantClass *klass)
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *point_filter_class;

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

  operation_class->prepare = prepare;
  point_filter_class->process = process;

  gegl_operation_class_set_keys (operation_class,
      "name",       "gegl:noise-rgb",
      "categories", "noise",
      "description", _("Distort colors by random amounts."),
      NULL);
}
示例#16
0
static void
gegl_op_class_init (GeglOpClass *klass)
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *filter_class;

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

  operation_class->prepare = prepare;
  filter_class->process    = process;

  gegl_operation_class_set_keys (operation_class,
    "categories",   "color",
    "name",         "gegl:color-rotate",
    "description",  _("Replace a range of colors with another"),
    NULL);
}
示例#17
0
static void
gegl_chant_class_init (GeglChantClass *klass)
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *point_filter_class;

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

  operation_class->prepare = prepare;
  point_filter_class->process = process;

  gegl_operation_class_set_keys (operation_class,
    "name"        , "gegl:color-exchange",
    "categories"  , "colors/map",
    "description" , _("Exchanges one color with another."),
    NULL);
}
示例#18
0
static void
gegl_chant_class_init (GeglChantClass *klass)
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *point_filter_class;

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

  operation_class->prepare = prepare;
  point_filter_class->process = process;

  gegl_operation_class_set_keys (operation_class,
    "name"        , "gegl:max-rgb",
    "categories"  , "color",
    "description" , _("Reduce image to pure red, green, and blue"),
    NULL);
}
示例#19
0
static void
gegl_op_class_init (GeglOpClass *klass)
{
  GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
  GeglOperationPointFilterClass *point_filter_class =
    GEGL_OPERATION_POINT_FILTER_CLASS (klass);

  operation_class->prepare = prepare;
  operation_class->opencl_support = FALSE;

  point_filter_class->process = process;

  gegl_operation_class_set_keys (operation_class,
    "name"       , "gegl:saturation",
    "title",       _("Saturation"),
    "categories" , "color",
    "description", _("Changes the saturation"),
    NULL);
}
示例#20
0
static void
gegl_chant_class_init (GeglChantClass *klass)
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *point_filter_class;

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

  operation_class->prepare = prepare;
  point_filter_class->process = process;

  gegl_operation_class_set_keys (operation_class,
    "name"       , "gegl:mono-mixer",
    "categories" , "color",
    "description", _("Monochrome channel mixer"),
    "cl-source"  , kernel_source,
    NULL);
}
示例#21
0
static void
gegl_op_class_init (GeglOpClass *klass)
{
    GObjectClass                  *object_class;
    GeglOperationClass            *operation_class;
    GeglOperationPointFilterClass *point_filter_class;
    gchar                         *composition = "<?xml version='1.0' encoding='UTF-8'?>"
            "<gegl>"
            "<node operation='gegl:color-temperature'>"
            "  <params>"
            "    <param name='intended-temperature'>12000</param>"
            "  </params>"
            "</node>"
            "<node operation='gegl:load'>"
            "  <params>"
            "    <param name='path'>standard-input.png</param>"
            "  </params>"
            "</node>"
            "</gegl>";

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

    object_class->finalize = finalize;
    object_class->notify   = notify;

    operation_class->prepare = prepare;

    point_filter_class->process    = process;
    point_filter_class->cl_process = cl_process;

    operation_class->opencl_support = TRUE;

    gegl_operation_class_set_keys (operation_class,
                                   "name",        "gegl:color-temperature",
                                   "title",       _("Color Temperature"),
                                   "categories",  "color",
                                   "description", _("Change the color temperature of the image, from an assumed original color temperature to an intended one."),
                                   "reference-composition", composition,
                                   NULL);
}
示例#22
0
static void
gegl_op_class_init (GeglOpClass *klass)
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *point_filter_class;

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

  operation_class->prepare        = prepare;
  operation_class->opencl_support = FALSE;
  point_filter_class->process     = process;

  gegl_operation_class_set_keys (operation_class,
    "name",        "gegl:component-extract",
    "title",       _("Extract Component"),
    "categories",  "color",
    "description", _("Extract a color model component"),
    NULL);
}
示例#23
0
static void
gegl_chant_class_init (GeglChantClass *klass)
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *point_filter_class;

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

  point_filter_class->process = process;
  point_filter_class->cl_process = cl_process;

  operation_class->opencl_support = TRUE;

  gegl_operation_class_set_keys (operation_class,
    "name"       , "gegl:levels",
    "categories" , "color",
    "description", _("Remaps the intensity range of the image"),
    NULL);
}
示例#24
0
static void
gegl_op_class_init (GeglOpClass *klass)
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *point_filter_class;

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

  operation_class->prepare    = prepare;
  point_filter_class->process = process;

  gegl_operation_class_set_keys (operation_class,
    "name",        "gegl:noise-cie-lch",
    "title",       _("Add CIE Lch Noise"),
    "reference-hash", "438deabf01651025c15ce86c3637e652",
    "categories",  "noise",
    "description", _("Randomize lightness, chroma and hue independently"),
    NULL);
}
示例#25
0
文件: noise-rgb.c 项目: jonnor/gegl
static void
gegl_op_class_init (GeglOpClass *klass)
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *point_filter_class;

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

  operation_class->prepare    = prepare;
  point_filter_class->process = process;

  gegl_operation_class_set_keys (operation_class,
    "name",           "gegl:noise-rgb",
    "title",          _("Add RGB Noise"),
    "categories",     "noise",
    "reference-hash", "b92f11f3a5f288c4f0e20afb0bba054f",
    "description", _("Distort colors by random amounts"),
    NULL);
}
示例#26
0
static void
gegl_chant_class_init (GeglChantClass *klass)
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *point_filter_class;

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

  operation_class->prepare        = prepare;
  operation_class->opencl_support = TRUE;
  point_filter_class->process     = process;
  point_filter_class->cl_process  = cl_process;

  gegl_operation_class_set_keys (operation_class,
    "name",        "gegl:alien-map",
    "categories",  "artistic",
    "description", _("Alters colors using sine transformations"),
    NULL);
}
示例#27
0
static void
gegl_chant_class_init (GeglChantClass *klass)
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *point_filter_class;

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

  point_filter_class->process = process;
  operation_class->prepare = prepare;

  gegl_operation_class_set_keys (operation_class,
    "name"       , "gegl:value-invert",
    "categories" , "color",
    "description",
        _("Inverts just the value component, the result is the corresponding "
          "`inverted' image."),
    "cl-source"  , kernel_source,
    NULL);
}
示例#28
0
static void
gegl_op_class_init (GeglOpClass *klass)
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *point_filter_class;

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

  operation_class->prepare        = prepare;
  operation_class->opencl_support = TRUE;
  point_filter_class->process     = process;
  point_filter_class->cl_process  = cl_process;

  gegl_operation_class_set_keys (operation_class,
    "name",        "gegl:alien-map",
    "title",       _("Alien Map"),
    "categories",  "artistic",
    "description", _("Heavily distort images colors by applying trigonometric functions to map color values."),
    NULL);
}
示例#29
0
static void
gegl_op_class_init (GeglOpClass *klass)
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *point_filter_class;

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

  operation_class->prepare     = prepare;
  point_filter_class->process  = process;

  gegl_operation_class_set_keys (operation_class,
    "name"       , "gegl:invert-gamma",
    "title",      _("Invert in Perceptual space"),
    "categories" , "color",
    "description",
       _("Inverts the components (except alpha), the result is the "
         "corresponding \"negative\" image."),
    NULL);
}
示例#30
0
文件: cache.c 项目: don-mccomb/gegl
static void
gegl_op_class_init (GeglOpClass *klass)
{
  GeglOperationClass            *operation_class;
  GeglOperationPointFilterClass *point_filter_class;

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

  operation_class->no_cache      = FALSE;
  operation_class->want_in_place = FALSE;
  operation_class->prepare       = prepare;
  point_filter_class->process    = process;

  gegl_operation_class_set_keys (operation_class,
    "name",        "gegl:cache",
    "title",       _("Explicit cache of results at this point of graph."),
    "categories",  "programming",
    "description", _("An explicit caching node"),
    NULL);
}