Commit 09f20732c for imagemagick.org
commit 09f20732c4f9c8774277ee43e59cb51d1d765b78
Author: Cristy <urban-warrior@imagemagick.org>
Date: Sat Jun 28 19:47:29 2025 -0400
correct AE metric
diff --git a/MagickCore/compare.c b/MagickCore/compare.c
index 87a3adffd..64531457e 100644
--- a/MagickCore/compare.c
+++ b/MagickCore/compare.c
@@ -397,7 +397,7 @@ static MagickBooleanType GetAESimilarity(const Image *image,
GetPixelChannel(reconstruct_image,channel,q);
else
error=Sa*p[i]-Da*GetPixelChannel(reconstruct_image,channel,q);
- if ((error*error) >= fuzz)
+ if ((error*error) > fuzz)
{
channel_similarity[i]++;
count++;
@@ -529,7 +529,7 @@ static MagickBooleanType GetFUZZSimilarity(const Image *image,
GetPixelChannel(reconstruct_image,channel,q);
else
error=Sa*p[i]-Da*GetPixelChannel(reconstruct_image,channel,q);
- if ((error*error) >= fuzz)
+ if ((error*error) > fuzz)
{
channel_similarity[i]+=QuantumScale*error*QuantumScale*error;
channel_similarity[CompositePixelChannel]+=QuantumScale*error*