Package: png++ / 0.2.9-2

1004-use-imagemagick-compare-for-testsuite.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: Use imagemagick's compare for the testsuite, and compare with fuzz
 As changing colorspace might introduce rounding errors, a binary comparison
 will lead to false failures in the test suite. This patch ceased to use cmp
 but uses compare with a very low fuzz of 0.5% to see if the image is same, it
 is used for all tests with convert_colorspace.
 See also http://www.libpng.org/pub/png/spec/1.2/PNG-Encoders.html for
 rationale.
Author: Tobias Frost <tobi@debian.org>
Forwarded: no (upstream BTS currently down)
Last-Update: 2018-04-13
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/test/test.sh
+++ b/test/test.sh
@@ -22,7 +22,7 @@
         for k in 8 16; do
             for p in PB PB2; do     # this tests solid buffer vs. original
                 name=$i.$j.$k.out   # no $p in the name, they should not differ
-                run "./convert_color_space $j $k $p $i out/$name && cmp out/$name cmp/$name"
+                run "./convert_color_space $j $k $p $i out/$name && compare -verbose -metric AE -fuzz 0.5% out/$name cmp/$name null:"
             done;
         done;
     done;