From: cristy Date: Tue, 12 May 2015 12:19:01 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~1042 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4c61eeaa51ebc6bbbbf75f187ae71dd5005f6e38;p=imagemagick --- diff --git a/MagickCore/channel.c b/MagickCore/channel.c index e69eac59b..b468d2d04 100644 --- a/MagickCore/channel.c +++ b/MagickCore/channel.c @@ -503,8 +503,10 @@ MagickExport Image *CombineImages(const Image *image, combine_image=DestroyImage(combine_image); return((Image *) NULL); } - (void) SetImageColorspace(combine_image,colorspace == UndefinedColorspace ? - sRGBColorspace : colorspace,exception); + if ((colorspace == UndefinedColorspace) || (image->number_channels == 1)) + (void) SetImageColorspace(combine_image,sRGBColorspace,exception); + else + (void) SetImageColorspace(combine_image,colorspace,exception); if ((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0) combine_image->alpha_trait=BlendPixelTrait; /*