Colorspace bug in coders\ps.c and in coders\pdf.c 6.4.1-9

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
adriano_konzen

Colorspace bug in coders\ps.c and in coders\pdf.c 6.4.1-9

Post by adriano_konzen »

image_info->colorspace member deprecate
AcquireImage returns in image->colorspace always RGBColorspace

With this amendment I understand that it is no longer possible to change the image colorspace at the time to read or write.

-------------------------------------------------
ReadPSImage in coders\ps.c:

cmyk=image->colorspace == CMYKColorspace ? MagickTrue : MagickFalse;
Nave no sense! cmyk=MagickFalse;

if (image->colorspace == RGBColorspace)
cmyk=MagickFalse;
This is always true! It would have to be removed because it wrongly converts CMYK to RGB.
--------------------------------------------------
WritePSImage in coders\ps.c:
if (image->colorspace != RGBColorspace)
(void) SetImageColorspace(image,RGBColorspace);
This converting 100% of the images to RGB!
Old code (6.4.0-7)
if (image_info->colorspace == UndefinedColorspace)
(void) SetImageColorspace(image,RGBColorspace);
There would be more correct?
if (image->colorspace == UndefinedColorspace)
(void) SetImageColorspace(image,RGBColorspace);
It makes more sense to compare with UndefinedColorspace now? Then this code to be removed.

-------------------------------------------------
The same problems in ReadPDFImage and WritePDFImage in coders\pdf.c
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Colorspace bug in coders\ps.c and in coders\pdf.c 6.4.1-9

Post by magick »

We can reproduce the problem you have and will have a patch available by sometime tomorrow. Thanks.
Post Reply