[gegl] ops: add reference compositions - new reference compositions to better illustrate operation behaviou
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] ops: add reference compositions - new reference compositions to better illustrate operation behaviou
- Date: Wed, 31 Mar 2021 17:29:24 +0000 (UTC)
commit 00e3b86ff141d987b64c3ae038484a098c00c5c7
Author: John Marshall <jtm home gmail com>
Date: Thu Jul 9 19:47:17 2020 +0100
ops: add reference compositions
- new reference compositions to better illustrate operation behaviour
operations/common-cxx/distance-transform.cc | 37 ++++++++++++++-----------
operations/common-gpl3+/bump-map.c | 37 +++++++++++++++++++++----
operations/common-gpl3+/channel-mixer.c | 42 ++++++++++++++++++++++++-----
operations/common-gpl3+/color-exchange.c | 26 +++++++++++++++++-
operations/common-gpl3+/engrave.c | 22 ++++++++++++++-
operations/common-gpl3+/illusion.c | 10 ++++++-
operations/common/color-overlay.c | 21 +++++++++++++++
operations/common/color-rotate.c | 33 ++++++++++++++++++++---
operations/common/color-warp.c | 34 ++++++++++++++++++++---
operations/common/layer.c | 32 +++++++++++++++++++---
operations/common/reinhard05.c | 18 ++++++++++++-
operations/common/rgb-clip.c | 23 +++++++++++++++-
operations/common/saturation.c | 32 ++++++++++++++++++----
13 files changed, 320 insertions(+), 47 deletions(-)
---
diff --git a/operations/common-cxx/distance-transform.cc b/operations/common-cxx/distance-transform.cc
index 9023ccd4a..224c45fbb 100644
--- a/operations/common-cxx/distance-transform.cc
+++ b/operations/common-cxx/distance-transform.cc
@@ -445,20 +445,25 @@ gegl_op_class_init (GeglOpClass *klass)
const gchar *composition =
"<?xml version='1.0' encoding='UTF-8'?>"
"<gegl>"
- "<node operation='gegl:distance-transform'>"
- " <params>"
- " <param name='metric'>euclidean</param>"
- " <param name='threshold_lo'>0.0001</param>"
- " <param name='threshold_hi'>1.0</param>"
- " <param name='averaging'>0</param>"
- " <param name='normalize'>true</param>"
- " </params>"
- "</node>"
- "<node operation='gegl:load'>"
- " <params>"
- " <param name='path'>standard-input.png</param>"
- " </params>"
- "</node>"
+ " <node operation='gegl:crop' width='200' height='200'/>"
+ " <node operation='gegl:over'>"
+ " <node operation='gegl:distance-transform'>"
+ " <params>"
+ " <param name='metric'>euclidean</param>"
+ " <param name='threshold_lo'>0.0001</param>"
+ " <param name='threshold_hi'>1.0</param>"
+ " <param name='averaging'>0</param>"
+ " <param name='normalize'>true</param>"
+ " </params>"
+ " </node>"
+ " <node operation='gegl:load' path='standard-input.png'/>"
+ " </node>"
+ " <node operation='gegl:checkerboard'>"
+ " <params>"
+ " <param name='color1'>rgb(0.25,0.25,0.25)</param>"
+ " <param name='color2'>rgb(0.75,0.75,0.75)</param>"
+ " </params>"
+ " </node>"
"</gegl>";
operation_class = GEGL_OPERATION_CLASS (klass);
@@ -474,10 +479,10 @@ gegl_op_class_init (GeglOpClass *klass)
gegl_operation_class_set_keys (operation_class,
"name", "gegl:distance-transform",
"title", _("Distance Transform"),
- "reference-hash", "31dd3c9b78a79583db929b0f77a56191",
"categories", "map",
- "description", _("Calculate a distance transform"),
+ "reference-hash", "620bf37294bca66e4190da60c5be5622",
"reference-composition", composition,
+ "description", _("Calculate a distance transform"),
NULL);
}
diff --git a/operations/common-gpl3+/bump-map.c b/operations/common-gpl3+/bump-map.c
index f3ea2b039..65ae6134d 100644
--- a/operations/common-gpl3+/bump-map.c
+++ b/operations/common-gpl3+/bump-map.c
@@ -432,7 +432,31 @@ gegl_op_class_init (GeglOpClass *klass)
GObjectClass *object_class;
GeglOperationClass *operation_class;
GeglOperationComposerClass *composer_class;
-
+ gchar *composition =
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gegl>"
+ " <node operation='gegl:crop' width='200' height='200'/>"
+ " <node operation='gegl:over'>"
+ " <node operation='gegl:bump-map'>"
+ " <params>"
+ " <param name='depth'>15</param>"
+ " <param name='elevation'>30.0000</param>"
+ " <param name='tiled'>false</param>"
+ " <param name='offset-x'>0</param>"
+ " <param name='offset-y'>0</param>"
+ " </params>"
+ " <node operation='gegl:load' path='standard-input.png'/>"
+ " </node>"
+ " <node operation='gegl:color' value='rgb(0.5,0.5,0.5)'/>"
+ " </node>"
+ " <node operation='gegl:checkerboard'>"
+ " <params>"
+ " <param name='color1'>rgb(0.25,0.25,0.25)</param>"
+ " <param name='color2'>rgb(0.75,0.75,0.75)</param>"
+ " </params>"
+ " </node>"
+ "</gegl>";
+
object_class = G_OBJECT_CLASS (klass);
operation_class = GEGL_OPERATION_CLASS (klass);
composer_class = GEGL_OPERATION_COMPOSER_CLASS (klass);
@@ -448,10 +472,13 @@ gegl_op_class_init (GeglOpClass *klass)
composer_class->aux_label = _("Height Map");
gegl_operation_class_set_keys (operation_class,
- "name", "gegl:bump-map",
- "categories", "light",
- "title", _("Bump Map"),
- "license", "GPL3+",
+ "name", "gegl:bump-map",
+ "title", _("Bump Map"),
+ "categories", "light",
+ "license", "GPL3+",
+ "reference-hash", "a648c21313c6168be01aed469c27903b",
+ "reference-composition", composition,
+// "reference-hash", "8d3700ec06e9cbba3cb2b4a9f3061a10",
"description", _("This plug-in uses the algorithm described by John "
"Schlag, \"Fast Embossing Effects on Raster Image "
"Data\" in Graphics GEMS IV (ISBN 0-12-336155-9). "
diff --git a/operations/common-gpl3+/channel-mixer.c b/operations/common-gpl3+/channel-mixer.c
index 21a43286b..a788b329c 100644
--- a/operations/common-gpl3+/channel-mixer.c
+++ b/operations/common-gpl3+/channel-mixer.c
@@ -250,6 +250,33 @@ gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointFilterClass *point_filter_class;
+ gchar *composition =
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gegl>"
+ " <node operation='gegl:crop' width='200' height='200'/>"
+ " <node operation='gegl:over'>"
+ " <node operation='gegl:channel-mixer'>"
+ " <params>"
+ " <param name='rr_gain'>0.0</param>"
+ " <param name='rg_gain'>0.5</param>"
+ " <param name='rb_gain'>0.0</param>"
+ " <param name='gr_gain'>0.0</param>"
+ " <param name='gg_gain'>0.0</param>"
+ " <param name='gb_gain'>0.5</param>"
+ " <param name='br_gain'>0.5</param>"
+ " <param name='bg_gain'>0.0</param>"
+ " <param name='bb_gain'>0.0</param>"
+ " </params>"
+ " </node>"
+ " <node operation='gegl:load' path='standard-input.png'/>"
+ " </node>"
+ " <node operation='gegl:checkerboard'>"
+ " <params>"
+ " <param name='color1'>rgb(0.25,0.25,0.25)</param>"
+ " <param name='color2'>rgb(0.75,0.75,0.75)</param>"
+ " </params>"
+ " </node>"
+ "</gegl>";
operation_class = GEGL_OPERATION_CLASS (klass);
point_filter_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
@@ -261,13 +288,14 @@ gegl_op_class_init (GeglOpClass *klass)
operation_class->opencl_support = TRUE;
gegl_operation_class_set_keys (operation_class,
- "name", "gegl:channel-mixer",
- "categories", "color",
- "reference-hash", "c7b822f909ec17da9c6fa4259d076da6",
- "title", _("Channel Mixer"),
- "license", "GPL3+",
- "description", _("Remix colors; by defining relative contributions from source components."),
- NULL);
+ "name", "gegl:channel-mixer",
+ "title", _("Channel Mixer"),
+ "categories", "color",
+ "license", "GPL3+",
+ "reference-hash", "94fdce1b979722a5f1f2069c7adeabbd",
+ "reference-composition", composition,
+ "description", _("Remix colors; by defining relative contributions from source components."),
+ NULL);
}
#endif
diff --git a/operations/common-gpl3+/color-exchange.c b/operations/common-gpl3+/color-exchange.c
index 09ddfc5b7..8df583bd7 100644
--- a/operations/common-gpl3+/color-exchange.c
+++ b/operations/common-gpl3+/color-exchange.c
@@ -227,6 +227,29 @@ 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:crop' width='200' height='200'/>"
+ " <node operation='gegl:over'>"
+ " <node operation='gegl:color-exchange'>"
+ " <params>"
+ " <param name='from-color'>rgba(1.0000, 1.0000, 0.0000, 1.0000)</param>"
+ " <param name='to-color'>rgba(0.0000, 1.0000, 0.0000, 1.0000)</param>"
+ " <param name='red-threshold'>0.500</param>"
+ " <param name='green-threshold'>0.500</param>"
+ " <param name='blue-threshold'>0.500</param>"
+ " </params>"
+ " </node>"
+ " <node operation='gegl:load' path='standard-input.png'/>"
+ " </node>"
+ " <node operation='gegl:checkerboard'>"
+ " <params>"
+ " <param name='color1'>rgb(0.25,0.25,0.25)</param>"
+ " <param name='color2'>rgb(0.75,0.75,0.75)</param>"
+ " </params>"
+ " </node>"
+ "</gegl>";
object_class = G_OBJECT_CLASS (klass);
operation_class = GEGL_OPERATION_CLASS (klass);
@@ -242,9 +265,10 @@ gegl_op_class_init (GeglOpClass *klass)
gegl_operation_class_set_keys (operation_class,
"name", "gegl:color-exchange",
"title", _("Exchange color"),
- "reference-hash", "d44569682486dd5187db20243520ff5d",
"categories", "color",
"license", "GPL3+",
+ "reference-hash", "21e8f306f881c8df508966b9a906365e",
+ "reference-composition", composition,
"description", _("Exchange one color with another, optionally setting "
"a threshold to convert from one shade to another."),
NULL);
diff --git a/operations/common-gpl3+/engrave.c b/operations/common-gpl3+/engrave.c
index 2373d9845..24e7341b0 100644
--- a/operations/common-gpl3+/engrave.c
+++ b/operations/common-gpl3+/engrave.c
@@ -188,6 +188,25 @@ gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationFilterClass *filter_class;
+ gchar *composition =
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gegl>"
+ " <node operation='gegl:crop' width='200' height='200'/>"
+ " <node operation='gegl:over'>"
+ " <node operation='gegl:engrave'>"
+ " <params>"
+ " <param name='row_height'>2</param>"
+ " </params>"
+ " </node>"
+ " <node operation='gegl:load' path='standard-input.png'/>"
+ " </node>"
+ " <node operation='gegl:checkerboard'>"
+ " <params>"
+ " <param name='color1'>rgb(0.25,0.25,0.25)</param>"
+ " <param name='color2'>rgb(0.75,0.75,0.75)</param>"
+ " </params>"
+ " </node>"
+ "</gegl>";
operation_class = GEGL_OPERATION_CLASS (klass);
filter_class = GEGL_OPERATION_FILTER_CLASS (klass);
@@ -201,7 +220,8 @@ gegl_op_class_init (GeglOpClass *klass)
"title", _("Engrave"),
"categories", "distort",
"license", "GPL3+",
- "reference-hash", "2fce9ed1adb05a50b7042fb9b5879529",
+ "reference-hash", "4efbeecb74321319ccbfdfb863b0d92e",
+ "reference-composition", composition,
"description", _("Simulate an antique engraving"),
NULL);
}
diff --git a/operations/common-gpl3+/illusion.c b/operations/common-gpl3+/illusion.c
index b2b902211..7c242fee3 100644
--- a/operations/common-gpl3+/illusion.c
+++ b/operations/common-gpl3+/illusion.c
@@ -254,6 +254,13 @@ gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationFilterClass *filter_class;
+ gchar *composition =
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gegl>"
+ " <node operation='gegl:crop' width='200' height='200'/>"
+ " <node operation='gegl:illusion'/>"
+ " <node operation='gegl:load' path='standard-input.png'/>"
+ "</gegl>";
operation_class = GEGL_OPERATION_CLASS (klass);
filter_class = GEGL_OPERATION_FILTER_CLASS (klass);
@@ -271,7 +278,8 @@ gegl_op_class_init (GeglOpClass *klass)
"title", _("Illusion"),
"categories", "map",
"license", "GPL3+",
- "reference-hash", "577ee48aed3b49af531e8a9a10676af9",
+ "reference-hash", "8a578729f9beb4e3fb35021995caae70",
+ "reference-composition", composition,
"description", _("Superimpose many altered copies of the image."),
NULL);
}
diff --git a/operations/common/color-overlay.c b/operations/common/color-overlay.c
index c496282b8..6532b40f1 100644
--- a/operations/common/color-overlay.c
+++ b/operations/common/color-overlay.c
@@ -141,6 +141,25 @@ gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointFilterClass *point_filter_class;
+ gchar *composition =
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gegl>"
+ " <node operation='gegl:crop' width='200' height='200'/>"
+ " <node operation='gegl:over'>"
+ " <node operation='gegl:color-overlay'>"
+ " <params>"
+ " <param name='value'>rgba(1.0,0.0,0.0,0.2)</param>"
+ " </params>"
+ " </node>"
+ " <node operation='gegl:load' path='standard-input.png'/>"
+ " </node>"
+ " <node operation='gegl:checkerboard'>"
+ " <params>"
+ " <param name='color1'>rgb(0.25,0.25,0.25)</param>"
+ " <param name='color2'>rgb(0.75,0.75,0.75)</param>"
+ " </params>"
+ " </node>"
+ "</gegl>";
operation_class = GEGL_OPERATION_CLASS (klass);
point_filter_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
@@ -154,6 +173,8 @@ gegl_op_class_init (GeglOpClass *klass)
"name", "gegl:color-overlay",
"categories", "color",
"title", _("Color Overlay"),
+ "reference-hash", "078b15ab732d02f2df2c5c111059d0ce",
+ "reference-composition", composition,
"description", _("Paint a color overlay over the input, "
"preserving its transparency."),
NULL);
diff --git a/operations/common/color-rotate.c b/operations/common/color-rotate.c
index b7111171b..09725ae16 100644
--- a/operations/common/color-rotate.c
+++ b/operations/common/color-rotate.c
@@ -396,6 +396,31 @@ gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointFilterClass *filter_class;
+ gchar *composition =
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gegl>"
+ " <node operation='gegl:crop' width='200' height='200'/>"
+ " <node operation='gegl:over'>"
+ " <node operation='gegl:color-rotate'>"
+ " <params>"
+ " <param name='src-clockwise'>false</param>"
+ " <param name='src-from'>90</param>"
+ " <param name='src-to'>180</param>"
+ " <param name='dest-clockwise'>false</param>"
+ " <param name='dest-from'>270</param>"
+ " <param name='dest-to'>360</param>"
+ " <param name='threshold'>0.15</param>"
+ " </params>"
+ " </node>"
+ " <node operation='gegl:load' path='standard-input.png'/>"
+ " </node>"
+ " <node operation='gegl:checkerboard'>"
+ " <params>"
+ " <param name='color1'>rgb(0.25,0.25,0.25)</param>"
+ " <param name='color2'>rgb(0.75,0.75,0.75)</param>"
+ " </params>"
+ " </node>"
+ "</gegl>";
operation_class = GEGL_OPERATION_CLASS (klass);
filter_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
@@ -404,9 +429,11 @@ gegl_op_class_init (GeglOpClass *klass)
filter_class->process = process;
gegl_operation_class_set_keys (operation_class,
- "categories", "color",
- "name", "gegl:color-rotate",
- "title", _("Color Rotate"),
+ "categories", "color",
+ "name", "gegl:color-rotate",
+ "title", _("Color Rotate"),
+ "reference-hash", "1ad6d3caf43fd510eddb8b890103b5c9",
+ "reference-composition", composition,
"description", _("Replace a range of colors with another"),
NULL);
}
diff --git a/operations/common/color-warp.c b/operations/common/color-warp.c
index 8885e98ee..c2bc9a9aa 100644
--- a/operations/common/color-warp.c
+++ b/operations/common/color-warp.c
@@ -298,6 +298,32 @@ 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:crop' width='200' height='200'/>"
+ " <node operation='gegl:over'>"
+ " <node operation='gegl:color-warp'>"
+ " <params>"
+ " <param name='from-0'>rgb(1.0000, 1.0000, 1.0000)</param>"
+ " <param name='to-0'>rgb(0.9900, 0.4500, 0.8500)</param>"
+ " <param name='weight-0'>100.00</param>"
+ " <param name='from-1'>rgb(0.0000, 0.0000, 0.0000)</param>"
+ " <param name='to-1'>rgb(0.5000, 0.0000, 0.5000)</param>"
+ " <param name='weight-1'>33.33</param>"
+ " <param name='weight'>1.00</param>"
+ " <param name='amount'>0.50</param>"
+ " </params>"
+ " </node>"
+ " <node operation='gegl:load' path='standard-input.png'/>"
+ " </node>"
+ " <node operation='gegl:checkerboard'>"
+ " <params>"
+ " <param name='color1'>rgb(0.25,0.25,0.25)</param>"
+ " <param name='color2'>rgb(0.75,0.75,0.75)</param>"
+ " </params>"
+ " </node>"
+ "</gegl>";
object_class = G_OBJECT_CLASS (klass);
operation_class = GEGL_OPERATION_CLASS (klass);
@@ -307,9 +333,11 @@ gegl_op_class_init (GeglOpClass *klass)
point_filter_class->process = process;
gegl_operation_class_set_keys (operation_class,
- "name", "gegl:color-warp",
- "title", _("Color warp"),
- "categories", "color",
+ "name", "gegl:color-warp",
+ "title", _("Color warp"),
+ "categories", "color",
+ "reference-composition", composition,
+ "reference-hash", "637569c3382fc061ee45513eaebf22d6",
"description", _("Warps the colors of an image between colors with weighted distortion factors, color
pairs which are black to black get ignored when constructing the mapping."),
NULL);
}
diff --git a/operations/common/layer.c b/operations/common/layer.c
index 6da03f6d6..5c1db3af9 100644
--- a/operations/common/layer.c
+++ b/operations/common/layer.c
@@ -225,6 +225,30 @@ gegl_op_class_init (GeglOpClass *klass)
GObjectClass *object_class;
GeglOperationClass *operation_class;
GeglOperationMetaClass *operation_meta_class;
+ gchar *composition =
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gegl>"
+ " <node operation='gegl:crop' width='200' height='200'/>"
+ " <node operation='gegl:over'>"
+ " <node operation='gegl:layer'>"
+ " <params>"
+ " <param name='opacity'>0.2</param>"
+ " <param name='x'>50</param>"
+ " <param name='y'>30</param>"
+ " <param name='scale'>0.5</param>"
+ " <param name='src'>standard-aux.png</param>"
+ " </params>"
+ " </node>"
+ " <node operation='gegl:load' path='standard-input.png'/>"
+ " </node>"
+ " <node operation='gegl:checkerboard'>"
+ " <params>"
+ " <param name='color1'>rgb(0.25,0.25,0.25)</param>"
+ " <param name='color2'>rgb(0.75,0.75,0.75)</param>"
+ " </params>"
+ " </node>"
+ "</gegl>";
+
object_class = G_OBJECT_CLASS (klass);
operation_class = GEGL_OPERATION_CLASS (klass);
@@ -235,9 +259,11 @@ gegl_op_class_init (GeglOpClass *klass)
operation_class->attach = attach;
gegl_operation_class_set_keys (operation_class,
- "name" , "gegl:layer",
- "categories" , "meta",
- "title" , _("Layer"),
+ "name", "gegl:layer",
+ "categories", "meta",
+ "title", _("Layer"),
+ "reference-hash", "44367aea166d43d6d55f8e11d0a654ee",
+ "reference-composition", composition,
"description", _("A layer in the traditional sense"),
NULL);
}
diff --git a/operations/common/reinhard05.c b/operations/common/reinhard05.c
index 139c6bd7e..65b52f63a 100644
--- a/operations/common/reinhard05.c
+++ b/operations/common/reinhard05.c
@@ -285,6 +285,21 @@ gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationFilterClass *filter_class;
+ gchar *composition =
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gegl>"
+ " <node operation='gegl:crop' width='200' height='200'/>"
+ " <node operation='gegl:over'>"
+ " <node operation='gegl:reinhard05'/>"
+ " <node operation='gegl:load' path='standard-input.png'/>"
+ " </node>"
+ " <node operation='gegl:checkerboard'>"
+ " <params>"
+ " <param name='color1'>rgb(0.25,0.25,0.25)</param>"
+ " <param name='color2'>rgb(0.75,0.75,0.75)</param>"
+ " </params>"
+ " </node>"
+ "</gegl>";
operation_class = GEGL_OPERATION_CLASS (klass);
filter_class = GEGL_OPERATION_FILTER_CLASS (klass);
@@ -301,7 +316,8 @@ gegl_op_class_init (GeglOpClass *klass)
"name", "gegl:reinhard05",
"title", _("Reinhard 2005 Tone Mapping"),
"categories" , "tonemapping",
- "reference-hash", "ce38b47d455298d78db3a91748c4f9a5",
+ "reference-hash", "fb6bb888c83014f5c452e64dcff11455",
+ "reference-composition", composition,
"description",
_("Adapt an image, which may have a high dynamic range, for "
"presentation using a low dynamic range. This is an efficient "
diff --git a/operations/common/rgb-clip.c b/operations/common/rgb-clip.c
index d9d31f903..85d72c932 100644
--- a/operations/common/rgb-clip.c
+++ b/operations/common/rgb-clip.c
@@ -173,6 +173,26 @@ gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointFilterClass *filter_class;
+ gchar *composition =
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gegl>"
+ " <node operation='gegl:crop' width='200' height='200'/>"
+ " <node operation='gegl:over'>"
+ " <node operation='gegl:rgb-clip'>"
+ " <params>"
+ " <param name='low_limit'>0.2</param>"
+ " <param name='high_limit'>0.8</param>"
+ " </params>"
+ " </node>"
+ " <node operation='gegl:load' path='standard-input.png'/>"
+ " </node>"
+ " <node operation='gegl:checkerboard'>"
+ " <params>"
+ " <param name='color1'>rgb(0.25,0.25,0.25)</param>"
+ " <param name='color2'>rgb(0.75,0.75,0.75)</param>"
+ " </params>"
+ " </node>"
+ "</gegl>";
operation_class = GEGL_OPERATION_CLASS (klass);
filter_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
@@ -186,8 +206,9 @@ gegl_op_class_init (GeglOpClass *klass)
gegl_operation_class_set_keys (operation_class,
"name", "gegl:rgb-clip",
"title", _("Clip RGB"),
- "reference-hash", "d44569682486dd5187db20243520ff5d",
"categories", "color",
+ "reference-hash", "a90f2b9f5b59357d85585720a7b2dd65",
+ "reference-composition", composition,
"description", _("Keep RGB pixels values inside a specific range"),
NULL);
}
diff --git a/operations/common/saturation.c b/operations/common/saturation.c
index 42630a40d..c79717d80 100644
--- a/operations/common/saturation.c
+++ b/operations/common/saturation.c
@@ -369,9 +369,30 @@ process (GeglOperation *operation,
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);
+ GeglOperationClass *operation_class;
+ GeglOperationPointFilterClass *point_filter_class;
+ gchar *composition =
+ "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gegl>"
+ " <node operation='gegl:crop' width='200' height='200'/>"
+ " <node operation='gegl:over'>"
+ " <node operation='gegl:saturation'>"
+ " <params>"
+ " <param name='scale'>2.0</param>"
+ " </params>"
+ " </node>"
+ " <node operation='gegl:load' path='standard-input.png'/>"
+ " </node>"
+ " <node operation='gegl:checkerboard'>"
+ " <params>"
+ " <param name='color1'>rgb(0.25,0.25,0.25)</param>"
+ " <param name='color2'>rgb(0.75,0.75,0.75)</param>"
+ " </params>"
+ " </node>"
+ "</gegl>";
+
+ operation_class = GEGL_OPERATION_CLASS (klass);
+ point_filter_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
operation_class->prepare = prepare;
operation_class->opencl_support = FALSE;
@@ -380,10 +401,11 @@ gegl_op_class_init (GeglOpClass *klass)
gegl_operation_class_set_keys (operation_class,
"name" , "gegl:saturation",
- "opi", "1:0",
"title", _("Saturation"),
- "reference-hash", "584bfe714947a573f10399965c8b45b0",
"categories" , "color",
+ "opi", "1:0",
+ "reference-hash", "c93c29f810f7743c454e3d8171878eee",
+ "reference-composition", composition,
"description", _("Changes the saturation"),
NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]