Page 1 of 1

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

Posted: 2008-06-23T07:49:23-07:00
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

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

Posted: 2008-06-23T10:45:38-07:00
by magick
We can reproduce the problem you have and will have a patch available by sometime tomorrow. Thanks.