From: Cristy Date: Mon, 14 May 2018 23:43:26 +0000 (-0400) Subject: Restore set alpha behavior X-Git-Tag: 7.0.7-33~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d711149fe912008ea19b1017171902d22e73344e;p=imagemagick Restore set alpha behavior --- diff --git a/MagickCore/image.c b/MagickCore/image.c index 27461c490..a021e9938 100644 --- a/MagickCore/image.c +++ b/MagickCore/image.c @@ -2316,7 +2316,6 @@ MagickExport MagickBooleanType SetImageAlpha(Image *image,const Quantum alpha, *image_view; MagickBooleanType - set_opaque, status; ssize_t @@ -2326,8 +2325,6 @@ MagickExport MagickBooleanType SetImageAlpha(Image *image,const Quantum alpha, if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); assert(image->signature == MagickCoreSignature); - set_opaque=(image->alpha_trait == UndefinedPixelTrait) ? MagickTrue : - MagickFalse; image->alpha_trait=BlendPixelTrait; status=MagickTrue; image_view=AcquireAuthenticCacheView(image,exception); @@ -2353,8 +2350,7 @@ MagickExport MagickBooleanType SetImageAlpha(Image *image,const Quantum alpha, } for (x=0; x < (ssize_t) image->columns; x++) { - if (set_opaque != MagickFalse) - SetPixelAlpha(image,OpaqueAlpha,q); + SetPixelAlpha(image,alpha,q); q+=GetPixelChannels(image); } if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)