public static ColorSpace getInstance(int colorspace) {
switch (colorspace) {
case CS_sRGB:
if (cs_sRGB == null) {
cs_sRGB = new ICC_ColorSpace(
new ICC_ProfileStub(CS_sRGB));
LUTColorConverter.sRGB_CS = cs_sRGB;
//ICC_Profile.getInstance (CS_sRGB));
}
return cs_sRGB;
case CS_CIEXYZ:
if (cs_CIEXYZ == null) {
cs_CIEXYZ = new ICC_ColorSpace(
new ICC_ProfileStub(CS_CIEXYZ));
//ICC_Profile.getInstance (CS_CIEXYZ));
}
return cs_CIEXYZ;
case CS_GRAY:
if (cs_Gray == null) {
cs_Gray = new ICC_ColorSpace(
new ICC_ProfileStub(CS_GRAY));
LUTColorConverter.LINEAR_GRAY_CS = cs_Gray;
//ICC_Profile.getInstance (CS_GRAY));
}
return cs_Gray;
case CS_PYCC:
if (cs_PYCC == null) {
cs_PYCC = new ICC_ColorSpace(
new ICC_ProfileStub(CS_PYCC));
//ICC_Profile.getInstance (CS_PYCC));
}
return cs_PYCC;
case CS_LINEAR_RGB:
if (cs_LRGB == null) {
cs_LRGB = new ICC_ColorSpace(
new ICC_ProfileStub(CS_LINEAR_RGB));
LUTColorConverter.LINEAR_GRAY_CS = cs_Gray;
//ICC_Profile.getInstance (CS_LINEAR_RGB));
}
return cs_LRGB;