[gegl] add test: enlarge and reflect flat color image



commit 8b265edd2482563e4a4b76ae64ad96d2291fb7c3
Author: Nicolas Robidoux <nrobidoux git gnome org>
Date:   Mon Dec 3 10:18:37 2012 -0500

    add test: enlarge and reflect flat color image

 tests/compositions/Makefile.am                     |    3 +-
 tests/compositions/affine-with-negative.xml        |   44 ++++++++++++++++++++
 .../reference/affine-with-negative.png             |  Bin 0 -> 10617 bytes
 3 files changed, 46 insertions(+), 1 deletions(-)
---
diff --git a/tests/compositions/Makefile.am b/tests/compositions/Makefile.am
index f6d6428..e3cc80d 100644
--- a/tests/compositions/Makefile.am
+++ b/tests/compositions/Makefile.am
@@ -30,12 +30,13 @@ testsuffix = .sh
 # List of tests. The .sh suffix allows us to use $(wildcard $(srcdir)/*.xml) in
 # EXTRA_DISTS
 TESTS = \
+  run-affine-with-negative.xml.sh      \
   run-clones.xml.sh                    \
   run-composite-transform.xml.sh       \
   run-edge-laplace-broken.xml.sh       \
   run-edge-sobel.xml.sh                \
   run-fattal02.xml.sh                  \
-  run-gamma.xml.sh              \
+  run-gamma.xml.sh                     \
   run-hdr-color.xml.sh                 \
   run-mantiuk06.xml.sh                 \
   run-pixelize.xml.sh                  \
diff --git a/tests/compositions/affine-with-negative.xml b/tests/compositions/affine-with-negative.xml
new file mode 100644
index 0000000..03629b7
--- /dev/null
+++ b/tests/compositions/affine-with-negative.xml
@@ -0,0 +1,44 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+  Checks for broken symmetry with negative scaling factors:
+
+  Enlarging and reflecting a flat color image should return a flat color image
+  (when cropped enough to remove boundary artifacts)
+
+  Older versions of GEGL (before November 2012) failed this test
+
+  Make sure to pngcrush the result when putting in reference: 1024x1024 size
+
+  Authors: Massimo Valentini 2012
+           Nicolas Robidoux  2012
+-->
+<gegl> 
+  <node operation='gegl:crop'>
+    <params>
+      <param name='x'>-512</param>
+      <param name='y'>-512</param>
+      <param name='width'>1024</param>
+      <param name='height'>1024</param>
+    </params>
+  </node>
+  <node operation='gegl:scale'>
+    <params>
+      <param name='filter'>'linear'</param>
+      <param name='x'>-4</param>
+      <param name='y'>-4</param>
+    </params>
+  </node>
+  <node operation='gegl:crop'>
+    <params>
+      <param name='x'>-260</param>
+      <param name='y'>-260</param>
+      <param name='width'>520</param>
+      <param name='height'>520</param>
+    </params>
+  </node>
+  <node operation='gegl:color'>
+    <params>
+      <param name='value'>#777</param>
+    </params>
+  </node>
+</gegl>
\ No newline at end of file
diff --git a/tests/compositions/reference/affine-with-negative.png b/tests/compositions/reference/affine-with-negative.png
new file mode 100644
index 0000000..85d4e2c
Binary files /dev/null and b/tests/compositions/reference/affine-with-negative.png differ



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