#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"
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)
(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");