image->endian=(*(char *) &lsb_first) == 1 ? LSBEndian : MSBEndian;
}
}
- 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);
(void) SyncImageProfiles(image);
option=GetImageOption(image_info,"delegate:bimodal");
if ((IfMagickTrue(IsStringTrue(option))) &&
(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");