From: Cristy Date: Sat, 12 Aug 2017 13:16:26 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.6-7~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0db4d8a1685ad2e60e31b322086332432fd878df;p=imagemagick ... --- diff --git a/MagickCore/compare.c b/MagickCore/compare.c index dfd4df50e..742836b14 100644 --- a/MagickCore/compare.c +++ b/MagickCore/compare.c @@ -267,7 +267,7 @@ MagickExport Image *CompareImages(Image *image,const Image *reconstruct_image, i; if ((GetPixelReadMask(image,p) <= (QuantumRange/2)) || - (GetPixelReadMask(reconstruct_image,q) == 0)) + (GetPixelReadMask(reconstruct_image,q) <= (QuantumRange/2))) { SetPixelViaPixelInfo(highlight_image,&masklight,r); p+=GetPixelChannels(image); @@ -534,7 +534,7 @@ static MagickBooleanType GetFuzzDistortion(const Image *image, i; if ((GetPixelReadMask(image,p) <= (QuantumRange/2)) || - (GetPixelReadMask(reconstruct_image,q) == 0)) + (GetPixelReadMask(reconstruct_image,q) <= (QuantumRange/2))) { p+=GetPixelChannels(image); q+=GetPixelChannels(reconstruct_image); @@ -645,7 +645,7 @@ static MagickBooleanType GetMeanAbsoluteDistortion(const Image *image, i; if ((GetPixelReadMask(image,p) <= (QuantumRange/2)) || - (GetPixelReadMask(reconstruct_image,q) == 0)) + (GetPixelReadMask(reconstruct_image,q) <= (QuantumRange/2))) { p+=GetPixelChannels(image); q+=GetPixelChannels(reconstruct_image); @@ -746,7 +746,7 @@ static MagickBooleanType GetMeanErrorPerPixel(Image *image, i; if ((GetPixelReadMask(image,p) <= (QuantumRange/2)) || - (GetPixelReadMask(reconstruct_image,q) == 0)) + (GetPixelReadMask(reconstruct_image,q) <= (QuantumRange/2))) { p+=GetPixelChannels(image); q+=GetPixelChannels(reconstruct_image); @@ -852,7 +852,7 @@ static MagickBooleanType GetMeanSquaredDistortion(const Image *image, i; if ((GetPixelReadMask(image,p) <= (QuantumRange/2)) || - (GetPixelReadMask(reconstruct_image,q) == 0)) + (GetPixelReadMask(reconstruct_image,q) <= (QuantumRange/2))) { p+=GetPixelChannels(image); q+=GetPixelChannels(reconstruct_image); @@ -974,7 +974,7 @@ static MagickBooleanType GetNormalizedCrossCorrelationDistortion( for (x=0; x < (ssize_t) columns; x++) { if ((GetPixelReadMask(image,p) <= (QuantumRange/2)) || - (GetPixelReadMask(reconstruct_image,q) == 0)) + (GetPixelReadMask(reconstruct_image,q) <= (QuantumRange/2))) { p+=GetPixelChannels(image); q+=GetPixelChannels(reconstruct_image); @@ -1009,7 +1009,7 @@ static MagickBooleanType GetNormalizedCrossCorrelationDistortion( Sa; if ((GetPixelReadMask(image,p) <= (QuantumRange/2)) || - (GetPixelReadMask(reconstruct_image,q) == 0)) + (GetPixelReadMask(reconstruct_image,q) <= (QuantumRange/2))) { p+=GetPixelChannels(image); q+=GetPixelChannels(reconstruct_image); @@ -1149,7 +1149,7 @@ static MagickBooleanType GetPeakAbsoluteDistortion(const Image *image, i; if ((GetPixelReadMask(image,p) <= (QuantumRange/2)) || - (GetPixelReadMask(reconstruct_image,q) == 0)) + (GetPixelReadMask(reconstruct_image,q) <= (QuantumRange/2))) { p+=GetPixelChannels(image); q+=GetPixelChannels(reconstruct_image); diff --git a/MagickCore/effect.c b/MagickCore/effect.c index 169ef60f4..80c7adf91 100644 --- a/MagickCore/effect.c +++ b/MagickCore/effect.c @@ -336,7 +336,7 @@ MagickExport Image *AdaptiveBlurImage(const Image *image,const double radius, (blur_traits == UndefinedPixelTrait)) continue; if (((blur_traits & CopyPixelTrait) != 0) || - (GetPixelWriteMask(image,p+center) == 0)) + (GetPixelWriteMask(image,p+center) <= (QuantumRange/2))) { SetPixelChannel(blur_image,channel,p[center+i],q); continue; @@ -657,7 +657,7 @@ MagickExport Image *AdaptiveSharpenImage(const Image *image,const double radius, (sharp_traits == UndefinedPixelTrait)) continue; if (((sharp_traits & CopyPixelTrait) != 0) || - (GetPixelWriteMask(image,p+center) == 0)) + (GetPixelWriteMask(image,p+center) <= (QuantumRange/2))) { SetPixelChannel(sharp_image,channel,p[center+i],q); continue; @@ -3252,7 +3252,7 @@ MagickExport Image *SelectiveBlurImage(const Image *image,const double radius, (blur_traits == UndefinedPixelTrait)) continue; if (((blur_traits & CopyPixelTrait) != 0) || - (GetPixelWriteMask(image,p+center) == 0)) + (GetPixelWriteMask(image,p+center) <= (QuantumRange/2))) { SetPixelChannel(blur_image,channel,p[center+i],q); continue; @@ -3544,7 +3544,7 @@ MagickExport Image *ShadeImage(const Image *image,const MagickBooleanType gray, (shade_traits == UndefinedPixelTrait)) continue; if (((shade_traits & CopyPixelTrait) != 0) || - (GetPixelWriteMask(linear_image,center) == 0)) + (GetPixelWriteMask(linear_image,center) <= (QuantumRange/2))) { SetPixelChannel(shade_image,channel,center[i],q); continue; diff --git a/MagickCore/fx.c b/MagickCore/fx.c index 4ee1299ed..36e6b0597 100644 --- a/MagickCore/fx.c +++ b/MagickCore/fx.c @@ -773,7 +773,7 @@ MagickExport Image *ColorizeImage(const Image *image,const char *blend, if (traits == UndefinedPixelTrait) continue; if (((traits & CopyPixelTrait) != 0) || - (GetPixelWriteMask(colorize_image,q) == 0)) + (GetPixelWriteMask(colorize_image,q) <= (QuantumRange/2))) continue; SetPixelChannel(colorize_image,(PixelChannel) i,ClampToQuantum( Colorize(q[i],GetPixelInfoChannel(&blend_percentage,(PixelChannel) i), @@ -3597,7 +3597,7 @@ MagickExport Image *MorphImages(const Image *image,const size_t number_frames, (morph_traits == UndefinedPixelTrait)) continue; if (((morph_traits & CopyPixelTrait) != 0) || - (GetPixelWriteMask(morph_images,p) == 0)) + (GetPixelWriteMask(morph_images,p) <= (QuantumRange/2))) { SetPixelChannel(morph_image,channel,p[i],q); continue; diff --git a/MagickCore/morphology.c b/MagickCore/morphology.c index 3331e83b2..8ea00c72a 100644 --- a/MagickCore/morphology.c +++ b/MagickCore/morphology.c @@ -2712,7 +2712,7 @@ static ssize_t MorphologyPrimitive(const Image *image,Image *morphology_image, (morphology_traits == UndefinedPixelTrait)) continue; if (((traits & CopyPixelTrait) != 0) || - (GetPixelWriteMask(image,p+center) == 0)) + (GetPixelWriteMask(image,p+center) <= (QuantumRange/2))) { SetPixelChannel(morphology_image,channel,p[center+i],q); continue; @@ -2863,7 +2863,7 @@ static ssize_t MorphologyPrimitive(const Image *image,Image *morphology_image, (morphology_traits == UndefinedPixelTrait)) continue; if (((traits & CopyPixelTrait) != 0) || - (GetPixelWriteMask(image,p+center) == 0)) + (GetPixelWriteMask(image,p+center) <= (QuantumRange/2))) { SetPixelChannel(morphology_image,channel,p[center+i],q); continue; @@ -3342,7 +3342,7 @@ static ssize_t MorphologyPrimitiveDirect(Image *image, if (traits == UndefinedPixelTrait) continue; if (((traits & CopyPixelTrait) != 0) || - (GetPixelWriteMask(image,p+center) == 0)) + (GetPixelWriteMask(image,p+center) <= (QuantumRange/2))) continue; pixels=p; pixel=(double) QuantumRange; @@ -3503,7 +3503,7 @@ static ssize_t MorphologyPrimitiveDirect(Image *image, if (traits == UndefinedPixelTrait) continue; if (((traits & CopyPixelTrait) != 0) || - (GetPixelWriteMask(image,p+center) == 0)) + (GetPixelWriteMask(image,p+center) <= (QuantumRange/2))) continue; pixels=p; pixel=(double) QuantumRange; diff --git a/MagickCore/paint.c b/MagickCore/paint.c index 1dc15d587..01ee6a8e9 100644 --- a/MagickCore/paint.c +++ b/MagickCore/paint.c @@ -829,7 +829,7 @@ MagickExport Image *OilPaintImage(const Image *image,const double radius, (paint_traits == UndefinedPixelTrait)) continue; if (((paint_traits & CopyPixelTrait) != 0) || - (GetPixelWriteMask(linear_image,p) == 0)) + (GetPixelWriteMask(linear_image,p) <= (QuantumRange/2))) { SetPixelChannel(paint_image,channel,p[center+i],q); continue;