From 291fa1760ccae6cb1d7f910944dd29d5c57f11d9 Mon Sep 17 00:00:00 2001 From: cristy Date: Sun, 29 Mar 2015 17:42:05 +0000 Subject: [PATCH] --- MagickCore/quantum.c | 4 +++- coders/miff.c | 11 ----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/MagickCore/quantum.c b/MagickCore/quantum.c index 9b8916db7..4fcf01793 100644 --- a/MagickCore/quantum.c +++ b/MagickCore/quantum.c @@ -47,6 +47,8 @@ #include "MagickCore/exception-private.h" #include "MagickCore/cache.h" #include "MagickCore/cache-private.h" +#include "MagickCore/colorspace.h" +#include "MagickCore/colorspace-private.h" #include "MagickCore/constitute.h" #include "MagickCore/delegate.h" #include "MagickCore/geometry.h" @@ -529,7 +531,7 @@ MagickExport QuantumType GetQuantumType(Image *image,ExceptionInfo *exception) if (image->alpha_trait != UndefinedPixelTrait) quantum_type=CMYKAQuantum; } - if (IsImageGray(image,exception) != MagickFalse) + if (IsGrayColorspace(image->colorspace) != MagickFalse) { quantum_type=GrayQuantum; if (image->alpha_trait != UndefinedPixelTrait) diff --git a/coders/miff.c b/coders/miff.c index 9dba61ad0..3020aeeb0 100644 --- a/coders/miff.c +++ b/coders/miff.c @@ -1983,17 +1983,6 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info, (void) SetImageStorageClass(image,DirectClass,exception); image->depth=image->depth <= 8 ? 8UL : image->depth <= 16 ? 16UL : image->depth <= 32 ? 32UL : 64UL; - if (IsImageGray(image,exception) == MagickFalse) - { - /* - sRGB masquerading as a grayscale image? - */ - if (IsGrayColorspace(image->colorspace) != MagickFalse) - (void) SetImageColorspace(image,sRGBColorspace,exception); - } - else - if (IsGrayColorspace(image->colorspace) == MagickFalse) - (void) SetImageColorspace(image,GRAYColorspace,exception); quantum_info=AcquireQuantumInfo(image_info,image); if (quantum_info == (QuantumInfo *) NULL) ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed"); -- 2.50.1