{
case BilevelType:
{
- if (SetImageMonochrome(image,exception) == MagickFalse)
- {
- status=TransformImageColorspace(image,sGRAYColorspace,exception);
- (void) NormalizeImage(image,exception);
- quantize_info=AcquireQuantizeInfo(image_info);
- quantize_info->number_colors=2;
- quantize_info->colorspace=sGRAYColorspace;
- status=QuantizeImage(quantize_info,image,exception);
- quantize_info=DestroyQuantizeInfo(quantize_info);
- }
+ status=TransformImageColorspace(image,sGRAYColorspace,exception);
+ (void) NormalizeImage(image,exception);
+ quantize_info=AcquireQuantizeInfo(image_info);
+ quantize_info->number_colors=2;
+ quantize_info->colorspace=sGRAYColorspace;
+ status=QuantizeImage(quantize_info,image,exception);
+ quantize_info=DestroyQuantizeInfo(quantize_info);
image->alpha_trait=UndefinedPixelTrait;
break;
}
case GrayscaleType:
{
- if (SetImageGray(image,exception) == MagickFalse)
- status=TransformImageColorspace(image,sGRAYColorspace,exception);
+ status=TransformImageColorspace(image,sGRAYColorspace,exception);
image->alpha_trait=UndefinedPixelTrait;
break;
}
case GrayscaleAlphaType:
{
- if (SetImageGray(image,exception) == MagickFalse)
- status=TransformImageColorspace(image,sGRAYColorspace,exception);
+ status=TransformImageColorspace(image,sGRAYColorspace,exception);
if (image->alpha_trait == UndefinedPixelTrait)
(void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception);
break;
}
case PaletteType:
{
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- status=TransformImageColorspace(image,sRGBColorspace,exception);
+ status=TransformImageColorspace(image,sRGBColorspace,exception);
if ((image->storage_class == DirectClass) || (image->colors > 256))
{
quantize_info=AcquireQuantizeInfo(image_info);
ChannelType
channel_mask;
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- status=TransformImageColorspace(image,sRGBColorspace,exception);
+ status=TransformImageColorspace(image,sRGBColorspace,exception);
if (image->alpha_trait == UndefinedPixelTrait)
(void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception);
channel_mask=SetImageChannelMask(image,AlphaChannel);
}
case PaletteAlphaType:
{
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- status=TransformImageColorspace(image,sRGBColorspace,exception);
+ status=TransformImageColorspace(image,sRGBColorspace,exception);
if (image->alpha_trait == UndefinedPixelTrait)
(void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception);
quantize_info=AcquireQuantizeInfo(image_info);
}
case TrueColorType:
{
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- status=TransformImageColorspace(image,sRGBColorspace,exception);
+ status=TransformImageColorspace(image,sRGBColorspace,exception);
if (image->storage_class != DirectClass)
status=SetImageStorageClass(image,DirectClass,exception);
image->alpha_trait=UndefinedPixelTrait;
}
case TrueColorAlphaType:
{
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- status=TransformImageColorspace(image,sRGBColorspace,exception);
+ status=TransformImageColorspace(image,sRGBColorspace,exception);
if (image->storage_class != DirectClass)
status=SetImageStorageClass(image,DirectClass,exception);
if (image->alpha_trait == UndefinedPixelTrait)
}
case ColorSeparationType:
{
- if (image->colorspace != CMYKColorspace)
- {
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- status=TransformImageColorspace(image,sRGBColorspace,exception);
- status=TransformImageColorspace(image,CMYKColorspace,exception);
- }
+ status=TransformImageColorspace(image,CMYKColorspace,exception);
if (image->storage_class != DirectClass)
status=SetImageStorageClass(image,DirectClass,exception);
image->alpha_trait=UndefinedPixelTrait;
}
case ColorSeparationAlphaType:
{
- if (image->colorspace != CMYKColorspace)
- {
- if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
- status=TransformImageColorspace(image,sRGBColorspace,exception);
- status=TransformImageColorspace(image,CMYKColorspace,exception);
- }
+ status=TransformImageColorspace(image,CMYKColorspace,exception);
if (image->storage_class != DirectClass)
status=SetImageStorageClass(image,DirectClass,exception);
if (image->alpha_trait == UndefinedPixelTrait)