[gegl] ops: update reference compositions to be more consistent with the default composition.



commit a45ece85cfe7143c7043c90ae65fd18987604492
Author: John Marshall <jtm home gmail com>
Date:   Wed Feb 3 22:45:48 2021 +0000

    ops: update reference compositions to be more
    consistent with the default composition.

 operations/common/brightness-contrast.c | 32 ++++++++++++++++-----------
 operations/common/c2g.c                 | 36 +++++++++++++++++--------------
 operations/common/color-temperature.c   | 31 ++++++++++++++++-----------
 operations/common/dither.c              | 38 +++++++++++++++++++--------------
 operations/common/levels.c              | 36 ++++++++++++++++++-------------
 operations/common/threshold.c           | 37 +++++++++++++++++---------------
 operations/core/crop.c                  | 38 +++++++++++++++++++--------------
 7 files changed, 143 insertions(+), 105 deletions(-)
---
diff --git a/operations/common/brightness-contrast.c b/operations/common/brightness-contrast.c
index 03528744f..375f88bd8 100644
--- a/operations/common/brightness-contrast.c
+++ b/operations/common/brightness-contrast.c
@@ -129,19 +129,25 @@ gegl_op_class_init (GeglOpClass *klass)
 {
   GeglOperationClass            *operation_class;
   GeglOperationPointFilterClass *point_filter_class;
-  gchar                         *composition = "<?xml version='1.0' encoding='UTF-8'?>"
+  gchar                         *composition = 
+    "<?xml version='1.0' encoding='UTF-8'?>"
     "<gegl>"
-    "<node operation='gegl:brightness-contrast'>"
-    "  <params>"
-    "    <param name='contrast'>1.8</param>"
-    "    <param name='brightness'>0.25</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:brightness-contrast'>"
+    "      <params>"
+    "        <param name='contrast'>1.8</param>"
+    "        <param name='brightness'>0.25</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);
@@ -158,7 +164,7 @@ gegl_op_class_init (GeglOpClass *klass)
       "name",       "gegl:brightness-contrast",
       "title",      _("Brightness Contrast"),
       "categories", "color",
-      "reference-hash", "a60848d705029cad1cb89e44feb7f56e",
+      "reference-hash", "d71a0399eb2edc30e86d7ee54e5d5d56",
 
       /* xgettext:no-c-format */
       "description", _("Changes the light level and contrast. This operation operates in linear light, 
'contrast' is a scale factor around 50% gray, and 'brightness' a constant offset to apply after contrast 
scaling."),
diff --git a/operations/common/c2g.c b/operations/common/c2g.c
index c6684fde1..c4e1c9b10 100644
--- a/operations/common/c2g.c
+++ b/operations/common/c2g.c
@@ -414,27 +414,31 @@ process (GeglOperation       *operation,
   return  TRUE;
 }
 
-static const gchar *composition =
-    "<?xml version='1.0'             encoding='UTF-8'?>"
-    "<gegl>"
-    "<node operation='gegl:c2g'>"
-    "  <params>"
-    "    <param name='radius'>200</param>"
-    "    <param name='iterations'>90</param>"
-    "  </params>"
-    "</node>"
-    "<node operation='gegl:load'>"
-    "  <params>"
-    "    <param name='path'>standard-input.png</param>"
-    "  </params>"
-    "</node>"
-    "</gegl>";
-
 static void
 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:c2g'>"
+    "      <params>"
+    "        <param name='radius'>200</param>"
+    "        <param name='iterations'>90</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);
diff --git a/operations/common/color-temperature.c b/operations/common/color-temperature.c
index 2b23ace2a..8a360aab8 100644
--- a/operations/common/color-temperature.c
+++ b/operations/common/color-temperature.c
@@ -233,20 +233,27 @@ 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'?>"
+  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>"
+    "  <node operation='gegl:crop' width='200' height='200'/>"
+    "  <node operation='gegl:over'>"
+    "    <node operation='gegl:color-temperature'>"
+    "      <params>"
+    "        <param name='intended-temperature'>12000</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);
   point_filter_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
@@ -263,7 +270,7 @@ gegl_op_class_init (GeglOpClass *klass)
     "name",        "gegl:color-temperature",
     "title",       _("Color Temperature"),
     "categories",  "color",
-    "reference-hash", "36b68887253870c0a48479e9b706b5b4",
+    "reference-hash", "0a5ec345755968efc091b084587de7cb",
     "description", _("Change the color temperature of the image, from an assumed original color temperature 
to an intended one."),
     "reference-composition", composition,
     NULL);
diff --git a/operations/common/dither.c b/operations/common/dither.c
index acef683dd..dbbfeef78 100644
--- a/operations/common/dither.c
+++ b/operations/common/dither.c
@@ -580,22 +580,28 @@ gegl_op_class_init (GeglOpClass *klass)
 {
   GeglOperationClass       *operation_class;
   GeglOperationFilterClass *filter_class;
-  gchar                    *composition = "<?xml version='1.0' encoding='UTF-8'?>"
+  gchar                    *composition =
+    "<?xml version='1.0' encoding='UTF-8'?>"
     "<gegl>"
-    "<node operation='gegl:color-reduction'>"
-    "  <params>"
-    "    <param name='red-levels'>4</param>"
-    "    <param name='green-levels'>4</param>"
-    "    <param name='blue-levels'>4</param>"
-    "    <param name='alpha-levels'>4</param>"
-    "    <param name='dither-method'>floyd-steinberg</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:color-reduction'>"
+    "      <params>"
+    "        <param name='red-levels'>4</param>"
+    "        <param name='green-levels'>4</param>"
+    "        <param name='blue-levels'>4</param>"
+    "        <param name='alpha-levels'>4</param>"
+    "        <param name='dither-method'>floyd-steinberg</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);
@@ -612,7 +618,7 @@ gegl_op_class_init (GeglOpClass *klass)
     "compat-name", "gegl:color-reduction",
     "title",       _("Dither"),
     "categories",  "dither",
-    "reference-hash", "eb9e2dc74369d32d195b2ed5c4acde44",
+    "reference-hash", "f28ecb303ab9ffbcb0c32033b2fd2dcf",
     "description", _("Reduce the number of colors in the image, by reducing "
                      "the levels per channel (colors and alpha). Different dithering methods "
                      "can be specified to counteract quantization induced banding."),
diff --git a/operations/common/levels.c b/operations/common/levels.c
index e86802f5c..e212aaeb1 100644
--- a/operations/common/levels.c
+++ b/operations/common/levels.c
@@ -170,21 +170,27 @@ gegl_op_class_init (GeglOpClass *klass)
 {
   GeglOperationClass            *operation_class;
   GeglOperationPointFilterClass *point_filter_class;
-  gchar                         *composition = "<?xml version='1.0' encoding='UTF-8'?>"
+  gchar                         *composition =
+    "<?xml version='1.0' encoding='UTF-8'?>"
     "<gegl>"
-    "<node operation='gegl:levels'>"
-    "  <params>"
-    "    <param name='in-low'>0.54</param>"
-    "    <param name='in-high'>0.60</param>"
-    "    <param name='out-low'>0.57</param>"
-    "    <param name='out-high'>0.68</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:levels'>"
+    "      <params>"
+    "        <param name='in-low'>0.54</param>"
+    "        <param name='in-high'>0.60</param>"
+    "        <param name='out-low'>0.57</param>"
+    "        <param name='out-high'>0.68</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);
@@ -200,7 +206,7 @@ gegl_op_class_init (GeglOpClass *klass)
     "title",       _("Levels"),
     "categories" , "color",
     "description", _("Remaps the intensity range of the image"),
-    "reference-hash", "52e9dca541181f09f6cfac68afe987a2",
+    "reference-hash", "b26ace9ce32e98b8ffa2a57f10a42e0d",
     "reference-composition", composition,
     NULL);
 }
diff --git a/operations/common/threshold.c b/operations/common/threshold.c
index 8eb90cc16..e7f6bbe09 100644
--- a/operations/common/threshold.c
+++ b/operations/common/threshold.c
@@ -95,26 +95,30 @@ process (GeglOperation       *op,
 
 #include "opencl/threshold.cl.h"
 
-static const gchar *composition =
-    "<?xml version='1.0'             encoding='UTF-8'?>"
-    "<gegl>"
-    "<node operation='gegl:threshold'>"
-    "  <params>"
-    "    <param name='value'>0.5</param>"
-    "  </params>"
-    "</node>"
-    "<node operation='gegl:load'>"
-    "  <params>"
-    "    <param name='path'>standard-input.png</param>"
-    "  </params>"
-    "</node>"
-    "</gegl>";
-
 static void
 gegl_op_class_init (GeglOpClass *klass)
 {
   GeglOperationClass              *operation_class;
   GeglOperationPointComposerClass *point_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:threshold'>"
+    "      <params>"
+    "        <param name='value'>0.5</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_composer_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
@@ -126,8 +130,7 @@ gegl_op_class_init (GeglOpClass *klass)
     "name" ,       "gegl:threshold",
     "title",       _("Threshold"),
     "categories" , "color",
-    "reference-hash", "d20432270a1364932ee88a326a3e26c8",
-    "reference-hashB", "5eab2520fa6e1ab9f321976d7eb3e238",
+    "reference-hash", "17f9861344e1105c15f3633f7312a9bd",
     "reference-composition", composition,
     "description",
           _("Thresholds the image to white/black based on either the global value "
diff --git a/operations/core/crop.c b/operations/core/crop.c
index 86283fc4f..8bc456a23 100644
--- a/operations/core/crop.c
+++ b/operations/core/crop.c
@@ -263,21 +263,27 @@ gegl_op_class_init (GeglOpClass *klass)
 {
   GObjectClass       *object_class;
   GeglOperationClass *operation_class;
-  gchar              *composition = "<?xml version='1.0' encoding='UTF-8'?>"
+  gchar              *composition = 
+    "<?xml version='1.0' encoding='UTF-8'?>"
     "<gegl>"
-    "<node operation='gegl:crop'>"
-    "  <params>"
-    "    <param name='x'>50</param>"
-    "    <param name='y'>80</param>"
-    "    <param name='width'>70</param>"
-    "    <param name='height'>60</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:crop'>"
+    "      <params>"
+    "        <param name='x'>50</param>"
+    "        <param name='y'>80</param>"
+    "        <param name='width'>70</param>"
+    "        <param name='height'>60</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);
@@ -296,9 +302,9 @@ gegl_op_class_init (GeglOpClass *klass)
       "name",        "gegl:crop",
       "categories",  "core",
       "title",       _("Crop"),
-      "description", _("Crops a buffer, if the aux pad is connected the bounding box of the node connected 
is used. When the crop area is configured to 0x0 at 0,0 and nothing is connected on aux, the bounding box of 
the node at the producing end of the input chain is used."),
-      "reference-hash", "6f9f160434a4e9484d334c29122e5682",
+      "reference-hash", "21d8d290e976349e653872a2f1330ae6",
       "reference-composition", composition,
+      "description", _("Crops a buffer, if the aux pad is connected the bounding box of the node connected 
is used. When the crop area is configured to 0x0 at 0,0 and nothing is connected on aux, the bounding box of 
the node at the producing end of the input chain is used."),
       NULL);
 
   operation_class->cache_policy = GEGL_CACHE_POLICY_NEVER;


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