pixel=ScaleQuantumToChar(GetPixelRed(image,p));
else
pixel=ScaleQuantumToAny(GetPixelRed(image,p),
- max_value);
+ max_value);
}
q=PopCharPixel((unsigned char) pixel,q);
p+=GetPixelChannels(image);
p=colormap;
for (i=0; i < (ssize_t) number_colormaps; i++)
for (x=0; x < (ssize_t) map_length; x++)
- *p++=(unsigned char) ScaleShortToQuantum(ReadBlobLSBShort(image));
+ *p++=(unsigned char) ScaleQuantumToChar(ScaleShortToQuantum(
+ ReadBlobLSBShort(image)));
}
if ((flags & 0x08) != 0)
{
for (x=0; x < (ssize_t) number_planes; x++)
{
ValidateColormapValue(image,(size_t) (x*map_length+
- (*p & mask)),&index,exception);
+ (*p & mask)),&index,exception);
*p=colormap[(ssize_t) index];
p++;
}