Commit b7283460f for imagemagick.org
commit b7283460f10bcdf474be06183938fe474d87e3fb
Author: Cristy <urban-warrior@imagemagick.org>
Date: Sat May 30 22:17:09 2026 -0400
revert
diff --git a/MagickCore/statistic.c b/MagickCore/statistic.c
index a50fef499..2714153d3 100644
--- a/MagickCore/statistic.c
+++ b/MagickCore/statistic.c
@@ -1799,7 +1799,7 @@ MagickExport ChannelPerceptualHash *GetImagePerceptualHash(const Image *image,
for (j=0; j < MaximumNumberOfImageMoments; j++)
{
double x = moments[channel].invariant[j];
- double alpha = -(x > 0.0 ? 1.0 : (x < 0.0 ? -1.0 : 0.0))*
+ double alpha = (x > 0.0 ? 1.0 : (x < 0.0 ? -1.0 : 0.0))*
log10(fabs(x)+MagickEpsilon);
if (alpha < mn)
@@ -1811,7 +1811,7 @@ MagickExport ChannelPerceptualHash *GetImagePerceptualHash(const Image *image,
for (j=0; j < MaximumNumberOfImageMoments; j++)
{
double x = moments[channel].invariant[j];
- double alpha = -(x > 0.0 ? 1.0 : (x < 0.0 ? -1.0 : 0.0))*
+ double alpha = (x > 0.0 ? 1.0 : (x < 0.0 ? -1.0 : 0.0))*
log10(fabs(x)+MagickEpsilon);
double scaled = 255.0*(alpha-mn)*MagickSafeReciprocal(mx-mn);
perceptual_hash[channel].phash[i][j]=MagickMin(MagickMax(scaled,0.0),