From aab799432bc91295227e82668839e98de54ec0d9 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 30 Dec 2017 20:36:11 +0000 Subject: [PATCH] Try comparing images using RMS error metric. --- test/test.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/test.cc b/test/test.cc index 0c2f324e0..41b845f85 100644 --- a/test/test.cc +++ b/test/test.cc @@ -236,11 +236,8 @@ check_image (boost::filesystem::path ref, boost::filesystem::path check) ref_image.read (ref.string ()); Magick::Image check_image; check_image.read (check.string ()); - BOOST_CHECK_MESSAGE ( - !ref_image.compare(check_image), - ref << " differs from " << check << " " - << ref_image.meanErrorPerPixel() << " " << ref_image.normalizedMaxError() << " " << ref_image.normalizedMeanError() - ); + double const dist = ref_image.compare(check_image, Magick::RootMeanSquaredErrorMetric); + BOOST_CHECK_MESSAGE (dist < 0.001, ref << " differs from " << check << " " << dist); } void -- 2.30.2