From: Cristy Date: Thu, 1 Jun 2017 18:44:25 +0000 (-0400) Subject: https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=32081 X-Git-Tag: 7.0.5-10~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4f11c06af82c864f813b559bcfd60e72a344162b;p=imagemagick https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=32081 --- diff --git a/ChangeLog b/ChangeLog index 752ba8919..6399e709f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ 2017-06-01 7.0.5-10 Cristy * Fix choppy bitmap font rendering (reference https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=32071). + * The +opaque option is not longer a noop (reference + https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=32081). 2017-05-28 7.0.5-9 Cristy * Release ImageMagick version 7.0.5-9, GIT revision 20113:8b67333:20170528. diff --git a/MagickCore/paint.c b/MagickCore/paint.c index b2dafb3b3..a07524dc6 100644 --- a/MagickCore/paint.c +++ b/MagickCore/paint.c @@ -916,6 +916,9 @@ MagickExport MagickBooleanType OpaquePaintImage(Image *image, MagickOffsetType progress; + PixelChannelMap + *channel_map; + PixelInfo conform_fill, conform_target, @@ -975,15 +978,16 @@ MagickExport MagickBooleanType OpaquePaintImage(Image *image, GetPixelInfoPixel(image,q,&pixel); if (IsFuzzyEquivalencePixelInfo(&pixel,&conform_target) != invert) { - if (image->channel_map[RedPixelChannel].traits == UpdatePixelTrait) + channel_map=image->channel_map; + if ((channel_map[RedPixelChannel].traits & UpdatePixelTrait) != 0) SetPixelRed(image,conform_fill.red,q); - if (image->channel_map[GreenPixelChannel].traits == UpdatePixelTrait) + if ((channel_map[GreenPixelChannel].traits & UpdatePixelTrait) != 0) SetPixelGreen(image,conform_fill.green,q); - if (image->channel_map[BluePixelChannel].traits == UpdatePixelTrait) + if ((channel_map[BluePixelChannel].traits & UpdatePixelTrait) != 0) SetPixelBlue(image,conform_fill.blue,q); - if (image->channel_map[BlackPixelChannel].traits == UpdatePixelTrait) + if ((channel_map[BlackPixelChannel].traits & UpdatePixelTrait) != 0) SetPixelBlack(image,conform_fill.black,q); - if (image->channel_map[AlphaPixelChannel].traits == UpdatePixelTrait) + if ((channel_map[AlphaPixelChannel].traits & UpdatePixelTrait) != 0) SetPixelAlpha(image,conform_fill.alpha,q); } q+=GetPixelChannels(image);