[gegl] tests: don't use gegl:scale in pre-processing steps



commit 9221dc7aac1ac1cea1a0ccdc108d3351527f446b
Author: Téo Mazars <teomazars gmail com>
Date:   Sat Dec 7 11:49:43 2013 +0100

    tests: don't use gegl:scale in pre-processing steps
    
    it produces unstable results in regards to floating point computations.

 tests/compositions/color-reduction.xml           |   48 +++++++++++++--------
 tests/compositions/reference/color-reduction.png |  Bin 392801 -> 298374 bytes
 tests/compositions/reference/tile.png            |  Bin 100407 -> 70116 bytes
 tests/compositions/tile.xml                      |   11 ++---
 4 files changed, 35 insertions(+), 24 deletions(-)
---
diff --git a/tests/compositions/color-reduction.xml b/tests/compositions/color-reduction.xml
index c5a4f8a..b454dc6 100644
--- a/tests/compositions/color-reduction.xml
+++ b/tests/compositions/color-reduction.xml
@@ -19,10 +19,12 @@
        <param name='seed'>0</param>
       </params>
     </node>
-    <node operation='gegl:scale-ratio'>
+    <node operation='gegl:crop'>
       <params>
-       <param name='x'>0.3</param>
-       <param name='y'>0.3</param>
+       <param name='x'>100</param>
+       <param name='y'>100</param>
+       <param name='width'>170</param>
+       <param name='height'>120</param>
       </params>
     </node>
     <node operation='gegl:load'>
@@ -50,10 +52,12 @@
        <param name='seed'>0</param>
       </params>
     </node>
-    <node operation='gegl:scale-ratio'>
+    <node operation='gegl:crop'>
       <params>
-       <param name='x'>0.3</param>
-       <param name='y'>0.3</param>
+       <param name='x'>100</param>
+       <param name='y'>100</param>
+       <param name='width'>170</param>
+       <param name='height'>120</param>
       </params>
     </node>
     <node operation='gegl:load'>
@@ -81,10 +85,12 @@
        <param name='seed'>0</param>
       </params>
     </node>
-    <node operation='gegl:scale-ratio'>
+    <node operation='gegl:crop'>
       <params>
-       <param name='x'>0.5</param>
-       <param name='y'>0.5</param>
+       <param name='x'>100</param>
+       <param name='y'>100</param>
+       <param name='width'>256</param>
+       <param name='height'>192</param>
       </params>
     </node>
     <node operation='gegl:load'>
@@ -112,10 +118,12 @@
        <param name='seed'>0</param>
       </params>
     </node>
-    <node operation='gegl:scale-ratio'>
+    <node operation='gegl:crop'>
       <params>
-       <param name='x'>0.5</param>
-       <param name='y'>0.5</param>
+       <param name='x'>100</param>
+       <param name='y'>100</param>
+       <param name='width'>256</param>
+       <param name='height'>192</param>
       </params>
     </node>
     <node operation='gegl:load'>
@@ -143,10 +151,12 @@
        <param name='seed'>0</param>
       </params>
     </node>
-    <node operation='gegl:scale-ratio'>
+    <node operation='gegl:crop'>
       <params>
-       <param name='x'>0.5</param>
-       <param name='y'>0.5</param>
+       <param name='x'>100</param>
+       <param name='y'>100</param>
+       <param name='width'>256</param>
+       <param name='height'>192</param>
       </params>
     </node>
     <node operation='gegl:load'>
@@ -174,10 +184,12 @@
        <param name='seed'>0</param>
       </params>
     </node>
-    <node operation='gegl:scale-ratio'>
+    <node operation='gegl:crop'>
       <params>
-       <param name='x'>0.5</param>
-       <param name='y'>0.5</param>
+       <param name='x'>100</param>
+       <param name='y'>100</param>
+       <param name='width'>256</param>
+       <param name='height'>192</param>
       </params>
     </node>
     <node operation='gegl:load'>
diff --git a/tests/compositions/reference/color-reduction.png 
b/tests/compositions/reference/color-reduction.png
index ae2b12e..5b51c1c 100644
Binary files a/tests/compositions/reference/color-reduction.png and 
b/tests/compositions/reference/color-reduction.png differ
diff --git a/tests/compositions/reference/tile.png b/tests/compositions/reference/tile.png
index 1c29ea4..4b5e79b 100644
Binary files a/tests/compositions/reference/tile.png and b/tests/compositions/reference/tile.png differ
diff --git a/tests/compositions/tile.xml b/tests/compositions/tile.xml
index bba7a01..b5b5c0b 100644
--- a/tests/compositions/tile.xml
+++ b/tests/compositions/tile.xml
@@ -12,13 +12,12 @@
       <param name='offset-y'>13</param>
     </params>
   </node>
-  <node operation='gegl:scale-ratio'>
+  <node operation='gegl:crop'>
     <params>
-      <param name='origin-x'>0.000000</param>
-      <param name='origin-y'>0.000000</param>
-      <param name='sampler'>linear</param>
-      <param name='x'>0.200000</param>
-      <param name='y'>0.200000</param>
+      <param name='x'>100</param>
+      <param name='y'>100</param>
+      <param name='width'>93</param>
+      <param name='height'>79</param>
     </params>
   </node>
   <node operation='gegl:load'>


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