From: Cristy Date: Tue, 5 Jun 2018 00:59:29 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.7-39~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=40ddbc61c5dc23acea24b0db4319c9c56c77b77b;p=imagemagick ... --- diff --git a/MagickCore/channel.c b/MagickCore/channel.c index 854c6c287..65b5ab6cc 100644 --- a/MagickCore/channel.c +++ b/MagickCore/channel.c @@ -433,7 +433,8 @@ MagickExport Image *ChannelFxImage(const Image *image,const char *expression, { case ExtractChannelOp: { - channel_mask=(ChannelType) (channel_mask | (1 << destination_channel)); + channel_mask=(ChannelType) (channel_mask | + (1UL << destination_channel)); destination_channel=(PixelChannel) (destination_channel+1); break; } @@ -858,7 +859,8 @@ MagickExport Image *SeparateImages(const Image *image,ExceptionInfo *exception) PixelTrait traits = GetPixelChannelTraits(image,channel); if ((traits == UndefinedPixelTrait) || ((traits & UpdatePixelTrait) == 0)) continue; - separate_image=SeparateImage(image,(ChannelType) (1 << channel),exception); + separate_image=SeparateImage(image,(ChannelType) (1UL << channel), + exception); if (separate_image != (Image *) NULL) AppendImageToList(&images,separate_image); } diff --git a/MagickCore/enhance.c b/MagickCore/enhance.c index 3a0db63c3..676d5f052 100644 --- a/MagickCore/enhance.c +++ b/MagickCore/enhance.c @@ -146,7 +146,7 @@ MagickExport MagickBooleanType AutoGammaImage(Image *image, PixelTrait traits = GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; - channel_mask=SetImageChannelMask(image,(ChannelType) (1 << i)); + channel_mask=SetImageChannelMask(image,(ChannelType) (1UL << i)); status=GetImageMean(image,&mean,&sans,exception); gamma=log(mean*QuantumScale)/log_mean; status&=LevelImage(image,0.0,(double) QuantumRange,gamma,exception); diff --git a/MagickCore/histogram.c b/MagickCore/histogram.c index e8cba5ccd..8fcdcccad 100644 --- a/MagickCore/histogram.c +++ b/MagickCore/histogram.c @@ -935,7 +935,7 @@ MagickExport MagickBooleanType MinMaxStretchImage(Image *image, PixelTrait traits = GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; - channel_mask=SetImageChannelMask(image,(ChannelType) (1 << i)); + channel_mask=SetImageChannelMask(image,(ChannelType) (1UL << i)); status&=GetImageRange(image,&min,&max,exception); min+=black; max-=white;