From a9bfaa41e221fe6f5417e75e16c67c17512b849d Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Sat, 19 May 2018 09:21:58 +0200 Subject: [PATCH] Fixed issue when writing 1 bit PCX images. --- coders/pcx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coders/pcx.c b/coders/pcx.c index 80008e691..60e6233a0 100644 --- a/coders/pcx.c +++ b/coders/pcx.c @@ -911,7 +911,6 @@ static MagickBooleanType WritePCXImage(const ImageInfo *image_info,Image *image, return(status); if ((image->columns > 65535UL) || (image->rows > 65535UL)) ThrowWriterException(ImageError,"WidthOrHeightExceedsLimit"); - (void) TransformImageColorspace(image,sRGBColorspace,exception); page_table=(MagickOffsetType *) NULL; if ((LocaleCompare(image_info->magick,"DCX") == 0) || ((GetNextImageInList(image) != (Image *) NULL) && @@ -944,6 +943,8 @@ static MagickBooleanType WritePCXImage(const ImageInfo *image_info,Image *image, if ((image->storage_class == PseudoClass) && (SetImageMonochrome(image,exception) != MagickFalse)) pcx_info.bits_per_pixel=1; + else + (void) TransformImageColorspace(image,sRGBColorspace,exception); pcx_info.left=0; pcx_info.top=0; pcx_info.right=(unsigned short) (image->columns-1); -- 2.40.0