From: Cristy Date: Fri, 22 Sep 2017 10:16:31 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.7-4~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=71231fc598b7f40b41efbc8a933554616393d7ed;p=imagemagick ... --- 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);