}
ColorModel cm = null;
if (colorspace instanceof PDIndexed)
{
PDIndexed csIndexed = (PDIndexed)colorspace;
COSBase maskArray = getMask();
if (maskArray != null && maskArray instanceof COSArray)
{
cm = csIndexed.createColorModel(bpc, ((COSArray)maskArray).getInt(0));
}
else
{
cm = csIndexed.createColorModel(bpc);
}
}
else if (colorspace instanceof PDSeparation)
{
PDSeparation csSeparation = (PDSeparation)colorspace;