[gegl] tools: img_cmp output the diff image as soon as there is a difference



commit 31c62241bca621d54b31d158530de24d54e268bb
Author: Téo Mazars <teomazars gmail com>
Date:   Sun Jan 5 13:08:59 2014 +0100

    tools: img_cmp output the diff image as soon as there is a difference
    
    ... with the reference image

 tools/img_cmp.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/tools/img_cmp.c b/tools/img_cmp.c
index 701d4b2..7a76894 100644
--- a/tools/img_cmp.c
+++ b/tools/img_cmp.c
@@ -68,8 +68,7 @@ main (gint    argc,
                   (wrong_pixels*100.0/total_pixels), max_diff,
                   avg_diff_wrong, avg_diff_total);
 
-      if (max_diff > 1.5 &&
-          !strstr (argv[2], "broken"))
+      if (!strstr (argv[2], "broken"))
         {
           GeglNode *save;
           gchar *debug_path = g_malloc (strlen (argv[2])+16);
@@ -88,8 +87,8 @@ main (gint    argc,
           /*gegl_graph (sink=gegl_node ("gegl:png-save",
                                       "path", debug_path, NULL,
                                       gegl_node ("gegl:buffer-source", "buffer", debug_buf, NULL)));*/
-
-          return 1;
+          if (max_diff > 1.5)
+            return 1;
         }
       if (strstr (argv[2], "broken"))
         g_print ("because the test is expected to fail ");


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