From: cristy Date: Sun, 8 Jan 2012 00:58:30 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~6435 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=286596bc339eeb04d858020a05d31131ec735aab;p=imagemagick --- diff --git a/coders/cmyk.c b/coders/cmyk.c index 3c1eee841..760a2060d 100644 --- a/coders/cmyk.c +++ b/coders/cmyk.c @@ -1211,13 +1211,6 @@ static MagickBooleanType WriteCMYKImage(const ImageInfo *image_info, if (status == MagickFalse) return(status); } - quantum_type=CMYKQuantum; - if (LocaleCompare(image_info->magick,"CMYKA") == 0) - { - quantum_type=CMYKAQuantum; - if (image->matte == MagickFalse) - SetImageAlphaChannel(image,OpaqueAlphaChannel,exception); - } scene=0; do { @@ -1226,9 +1219,13 @@ static MagickBooleanType WriteCMYKImage(const ImageInfo *image_info, */ if (image->colorspace != CMYKColorspace) (void) TransformImageColorspace(image,CMYKColorspace,exception); - if ((LocaleCompare(image_info->magick,"CMYKA") == 0) && - (image->matte == MagickFalse)) - (void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception); + quantum_type=CMYKQuantum; + if (LocaleCompare(image_info->magick,"CMYKA") == 0) + { + quantum_type=CMYKAQuantum; + if (image->matte == MagickFalse) + (void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception); + } quantum_info=AcquireQuantumInfo(image_info,image); if (quantum_info == (QuantumInfo *) NULL) ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");