From c48b5e5dc83523377085b53668d584a66d2968f4 Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 27 Feb 2017 07:43:39 -0500 Subject: [PATCH] ... --- MagickCore/compare.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/MagickCore/compare.c b/MagickCore/compare.c index 0e844825f..5cdbd89e7 100644 --- a/MagickCore/compare.c +++ b/MagickCore/compare.c @@ -1212,8 +1212,13 @@ static MagickBooleanType GetPeakSignalToNoiseRatio(const Image *image, status=GetMeanSquaredDistortion(image,reconstruct_image,distortion,exception); for (i=0; i <= MaxPixelChannels; i++) - if (fabs(distortion[i]) >= MagickEpsilon) - distortion[i]=20.0*MagickLog10((double) 1.0/sqrt(distortion[i])); + { + double + gamma; + + gamma=PerceptibleReciprocal(sqrt(distortion[i])); + distortion[i]=20.0*MagickLog10(gamma); + } return(status); } -- 2.40.0