depth=4*(n/4);
}
color->colorspace=sRGBColorspace;
+ color->depth=depth;
color->alpha_trait=UndefinedPixelTrait;
range=GetQuantumRange(depth);
color->red=(double) ScaleAnyToQuantum(pixel.red,range);
}
color->colorspace=(ColorspaceType) type;
if (IfMagickFalse(icc_color) && (color->colorspace == RGBColorspace))
- color->colorspace=sRGBColorspace; /* as required by SVG standard */
+ {
+ color->colorspace=sRGBColorspace; /* as required by SVG standard */
+ color->depth=8;
+ }
SetGeometryInfo(&geometry_info);
flags=ParseGeometry(name+i+1,&geometry_info);
if (flags == 0)
if (p == (const ColorInfo *) NULL)
return(MagickFalse);
color->colorspace=sRGBColorspace;
+ color->depth=8;
color->alpha_trait=p->color.alpha != OpaqueAlpha ? BlendPixelTrait :
UndefinedPixelTrait;
color->red=(double) p->color.red;
if ((count != 4) || (width > 10) || (image->columns == 0) ||
(image->rows == 0) || (image->colors == 0))
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
- image->depth=16;
/*
Remove unquoted characters.
*/
/*
Read image colormap.
*/
+ image->depth=1;
next=NextXPMLine(xpm_buffer);
for (j=0; (j < (ssize_t) image->colors) && (next != (char*) NULL); j++)
{
exception);
if (status == MagickFalse)
break;
+ if (image->depth < image->colormap[j].depth)
+ image->depth=image->colormap[j].depth;
}
if (j < (ssize_t) image->colors)
ThrowReaderException(CorruptImageError,"CorruptImage");