]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Tue, 12 May 2015 12:19:01 +0000 (12:19 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Tue, 12 May 2015 12:19:01 +0000 (12:19 +0000)
MagickCore/channel.c

index e69eac59b53736446d05996afea17e8064bb16e7..b468d2d04209ca52945af37dd453ad32a183de25 100644 (file)
@@ -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;
   /*