]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 29 Mar 2015 17:42:05 +0000 (17:42 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 29 Mar 2015 17:42:05 +0000 (17:42 +0000)
MagickCore/quantum.c
coders/miff.c

index 9b8916db7522a62d2b77f6575d9e5bed3a1b9415..4fcf017931dfa79f4fd1514a10b469cc5f0d0293 100644 (file)
@@ -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)
index 9dba61ad096237c678c1095101fbdce0b3d8abc2..3020aeeb02ecb287881a7227a6e826d853752039 100644 (file)
@@ -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");