Page 1 of 1
LAB colorspace recognized as RGB
Posted: 2007-06-18T07:53:17-07:00
by lyuan
ImageMagick 6.3.4, alway indicated the LAB tif file as RGB color space
identify -format '%r' "00968_2003_002_PR LAB.tif"
'DirectClassRGB'
Re: LAB colorspace recognized as RGB
Posted: 2007-06-25T12:34:09-07:00
by lyuan
I fixed it:
1. file coders\tiff.c(551)
static Image *ReadTIFFImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
...
if (photometric == PHOTOMETRIC_SEPARATED)
image->colorspace=CMYKColorspace;
//Lyuan added to set the LabColor Space
if (photometric == PHOTOMETRIC_CIELAB)
image->colorspace=LABColorspace;
//Lyuan end
(void) TIFFGetFieldDefaulted(tiff,TIFFTAG_SAMPLESPERPIXEL,
....
}
2. magick\colorspace.c(986):
MagickExport MagickBooleanType TransformRGBImage(Image *image,
const ColorspaceType colorspace)
{
...
switch (colorspace)
{
case GRAYColorspace:
case LABColorspace: //Lyuan Added
case Rec601LumaColorspace:
case Rec709LumaColorspace:
case RGBColorspace:
case TransparentColorspace:
case UndefinedColorspace:
return(MagickTrue);
...
}