From 286596bc339eeb04d858020a05d31131ec735aab Mon Sep 17 00:00:00 2001 From: cristy Date: Sun, 8 Jan 2012 00:58:30 +0000 Subject: [PATCH] --- coders/cmyk.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) 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"); -- 2.50.1