From 37b49851335e9df91de7cdf763d27768c85c69e3 Mon Sep 17 00:00:00 2001 From: Cristy Date: Thu, 12 Aug 2021 12:02:02 -0400 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/4059 --- magick/attribute.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/magick/attribute.c b/magick/attribute.c index 344835ec01..4c0c05e964 100644 --- a/magick/attribute.c +++ b/magick/attribute.c @@ -1577,6 +1577,11 @@ MagickExport MagickBooleanType SetImageType(Image *image,const ImageType type) status=TransformImageColorspace(image,GRAYColorspace); (void) NormalizeImage(image); status=BilevelImage(image,QuantumRange/2.0); + quantize_info=AcquireQuantizeInfo(image_info); + quantize_info->number_colors=2; + quantize_info->colorspace=GRAYColorspace; + status=QuantizeImage(quantize_info,image); + quantize_info=DestroyQuantizeInfo(quantize_info); image->matte=MagickFalse; break; }