|
|
|
|
|
|
|
|
int colSpaceType = cs.getType(); |
|
|
int colSpaceType = cs.getType(); |
|
|
if (colSpaceType == ColorSpace.TYPE_CMYK) { |
|
|
if (colSpaceType == ColorSpace.TYPE_CMYK) { |
|
|
this.color = color; |
|
|
this.color = color; |
|
|
this.componentsSize = 4; |
|
|
|
|
|
} else if (cs instanceof CIELabColorSpace) { |
|
|
} else if (cs instanceof CIELabColorSpace) { |
|
|
//TODO Convert between illuminants if not D50 according to rendering intents |
|
|
//TODO Convert between illuminants if not D50 according to rendering intents |
|
|
//Right now, we're assuming D50 as the GOCA spec requires. |
|
|
//Right now, we're assuming D50 as the GOCA spec requires. |
|
|
this.color = color; |
|
|
this.color = color; |
|
|
//16bit components didn't work, and 8-bit sadly has reduced accuracy. |
|
|
//16bit components didn't work, and 8-bit sadly has reduced accuracy. |
|
|
this.componentsSize = 3; |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
if (!color.getColorSpace().isCS_sRGB()) { |
|
|
if (!color.getColorSpace().isCS_sRGB()) { |
|
|
this.color = ColorUtil.toSRGBColor(color); |
|
|
this.color = ColorUtil.toSRGBColor(color); |
|
|
} else { |
|
|
} else { |
|
|
this.color = color; |
|
|
this.color = color; |
|
|
} |
|
|
} |
|
|
this.componentsSize = 3; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
this.componentsSize = this.color.getColorSpace().getNumComponents(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** {@inheritDoc} */ |
|
|
/** {@inheritDoc} */ |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** {@inheritDoc} */ |
|
|
/** {@inheritDoc} */ |
|
|
|
|
|
@Override |
|
|
byte getOrderCode() { |
|
|
byte getOrderCode() { |
|
|
return (byte) 0xB2; |
|
|
return (byte) 0xB2; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** {@inheritDoc} */ |
|
|
/** {@inheritDoc} */ |
|
|
|
|
|
@Override |
|
|
public String toString() { |
|
|
public String toString() { |
|
|
return "GraphicsSetProcessColor(col=" + color + ")"; |
|
|
return "GraphicsSetProcessColor(col=" + color + ")"; |
|
|
} |
|
|
} |