Colorspace bug in coders\ps.c and in coders\pdf.c 6.4.1-9
Posted: 2008-06-23T07:49:23-07:00
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
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