From 71231fc598b7f40b41efbc8a933554616393d7ed Mon Sep 17 00:00:00 2001 From: Cristy Date: Fri, 22 Sep 2017 06:16:31 -0400 Subject: [PATCH] ... --- MagickCore/pixel-accessor.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MagickCore/pixel-accessor.h b/MagickCore/pixel-accessor.h index 0fcffae7c..24e65ccff 100644 --- a/MagickCore/pixel-accessor.h +++ b/MagickCore/pixel-accessor.h @@ -470,7 +470,8 @@ static inline MagickBooleanType IsPixelEquivalent( beta=q->alpha_trait == UndefinedPixelTrait ? OpaqueAlpha : q->alpha; if (AbsolutePixelValue(alpha-beta) >= MagickEpsilon) return(MagickFalse); - if ((alpha == TransparentAlpha) || (beta == TransparentAlpha)) + if ((AbsolutePixelValue(alpha-TransparentAlpha) < MagickEpsilon) || + (AbsolutePixelValue(beta-TransparentAlpha) < MagickEpsilon)) return(MagickTrue); /* no color component if pixel is transparent */ value=(MagickRealType) p[image->channel_map[RedPixelChannel].offset]; if (AbsolutePixelValue(value-q->red) >= MagickEpsilon) @@ -519,7 +520,8 @@ static inline MagickBooleanType IsPixelInfoEquivalent( beta=q->alpha_trait == UndefinedPixelTrait ? OpaqueAlpha : q->alpha; if (AbsolutePixelValue(alpha-beta) >= MagickEpsilon) return(MagickFalse); - if ((alpha == TransparentAlpha) || (beta == TransparentAlpha)) + if ((AbsolutePixelValue(alpha-TransparentAlpha) < MagickEpsilon) || + (AbsolutePixelValue(beta-TransparentAlpha) < MagickEpsilon)) return(MagickTrue); /* no color component if pixel is transparent */ if (AbsolutePixelValue(p->red-q->red) >= MagickEpsilon) return(MagickFalse); -- 2.40.0