From 079c78db049d36758627d11dc4e2030e403dfd97 Mon Sep 17 00:00:00 2001 From: cristy Date: Tue, 3 Jul 2012 11:53:48 +0000 Subject: [PATCH] --- MagickCore/channel.c | 4 +++- MagickCore/fx.c | 1 + coders/png.c | 6 ------ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/MagickCore/channel.c b/MagickCore/channel.c index 2c93558bc..17adb85cb 100644 --- a/MagickCore/channel.c +++ b/MagickCore/channel.c @@ -645,8 +645,8 @@ MagickExport Image *SeparateImage(const Image *image, separate_image=DestroyImage(separate_image); return((Image *) NULL); } - SetImageColorspace(separate_image,GRAYColorspace,exception); separate_image->matte=MagickFalse; + (void) SetImageColorspace(separate_image,GRAYColorspace,exception); /* Separate image. */ @@ -726,6 +726,8 @@ MagickExport Image *SeparateImage(const Image *image, } separate_view=DestroyCacheView(separate_view); image_view=DestroyCacheView(image_view); + (void) SetImageColorspace(separate_image,image->colorspace,exception); + (void) TransformImageColorspace(separate_image,GRAYColorspace,exception); return(separate_image); } diff --git a/MagickCore/fx.c b/MagickCore/fx.c index a20386f4d..7a98f5404 100644 --- a/MagickCore/fx.c +++ b/MagickCore/fx.c @@ -4942,6 +4942,7 @@ MagickExport Image *StereoAnaglyphImage(const Image *left_image, stereo_image=DestroyImage(stereo_image); return((Image *) NULL); } + (void) SetImageColorspace(stereo_image,sRGBColorspace,exception); /* Copy left image to red channel and right image to blue channel. */ diff --git a/coders/png.c b/coders/png.c index b98268d56..350c8baa4 100644 --- a/coders/png.c +++ b/coders/png.c @@ -2726,12 +2726,6 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, */ SetImageColorspace(image,GRAYColorspace,exception); } - - else - { - /* Use colorspace data from PNG ancillary chunks */ - image->colorspace=GRAYColorspace; - } } if (((int) ping_color_type == PNG_COLOR_TYPE_PALETTE) || -- 2.40.0