From: Cristy Date: Sat, 10 Mar 2018 21:57:43 +0000 (-0500) Subject: ... X-Git-Tag: 7.0.7-26~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8655db07574f511642ba5e1f3b0a033b0dad41c9;p=imagemagick ... --- diff --git a/MagickCore/transform.c b/MagickCore/transform.c index 3216684be..7ded9edf5 100644 --- a/MagickCore/transform.c +++ b/MagickCore/transform.c @@ -474,7 +474,7 @@ MagickExport Image *ConsolidateCMYKImages(const Image *images, Quantum pixel; - pixel=QuantumRange-GetPixelIntensity(images,p); + pixel=ClampToQuantum(QuantumRange-GetPixelIntensity(images,p)); switch (i) { case 0: SetPixelCyan(cmyk_image,pixel,q); break; @@ -592,7 +592,7 @@ MagickExport Image *CropImage(const Image *image,const RectangleInfo *geometry, crop_image=CloneImage(image,1,1,MagickTrue,exception); if (crop_image == (Image *) NULL) return((Image *) NULL); - crop_image->background_color.alpha=(Quantum) TransparentAlpha; + crop_image->background_color.alpha=(MagickRealType) TransparentAlpha; crop_image->alpha_trait=BlendPixelTrait; (void) SetImageBackgroundColor(crop_image,exception); crop_image->page=bounding_box; @@ -2469,7 +2469,7 @@ MagickExport Image *TrimImage(const Image *image,ExceptionInfo *exception) crop_image=CloneImage(image,1,1,MagickTrue,exception); if (crop_image == (Image *) NULL) return((Image *) NULL); - crop_image->background_color.alpha=(Quantum) TransparentAlpha; + crop_image->background_color.alpha=(MagickRealType) TransparentAlpha; crop_image->alpha_trait=BlendPixelTrait; (void) SetImageBackgroundColor(crop_image,exception); crop_image->page=image->page;