本文整理汇总了Java中java.awt.color.ColorSpace.CS_PYCC属性的典型用法代码示例。如果您正苦于以下问题:Java ColorSpace.CS_PYCC属性的具体用法?Java ColorSpace.CS_PYCC怎么用?Java ColorSpace.CS_PYCC使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类java.awt.color.ColorSpace
的用法示例。
在下文中一共展示了ColorSpace.CS_PYCC属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getColorSpace
protected static ColorSpace getColorSpace(TestEnvironment env) {
ColorSpace cs;
Boolean usePlatfrom = true; //(Boolean)env.getModifier(usePlatfromProfiles);
int cs_code = env.getIntValue(csList);
if (usePlatfrom) {
cs = ColorSpace.getInstance(cs_code);
} else {
String resource = "profiles/";
switch (cs_code) {
case ColorSpace.CS_CIEXYZ:
resource += "CIEXYZ.pf";
break;
case ColorSpace.CS_GRAY:
resource += "GRAY.pf";
break;
case ColorSpace.CS_LINEAR_RGB:
resource += "LINEAR_RGB.pf";
break;
case ColorSpace.CS_PYCC:
resource += "PYCC.pf";
break;
case ColorSpace.CS_sRGB:
resource += "sRGB.pf";
break;
default:
throw new RuntimeException("Unknown color space: " + cs_code);
}
try {
InputStream is = CMMTests.class.getResourceAsStream(resource);
ICC_Profile p = ICC_Profile.getInstance(is);
cs = new ICC_ColorSpace(p);
} catch (IOException e) {
throw new RuntimeException("Unable load profile from resource " + resource, e);
}
}
return cs;
}
示例2: getCSName
static String getCSName(int cs) {
switch(cs) {
case ColorSpace.CS_GRAY:
return "CS_GRAY";
case ColorSpace.CS_CIEXYZ:
return "CS_CIEXYZ";
case ColorSpace.CS_LINEAR_RGB:
return "CS_LINEAR_RGB";
case ColorSpace.CS_PYCC:
return "CS_PYCC";
case ColorSpace.CS_sRGB:
return "CS_sRGB";
}
return "UNKNOWN";
}
示例3: getColorSpace
protected static ColorSpace getColorSpace(TestEnvironment env) {
ColorSpace cs;
boolean usePlatform = true; //(Boolean)env.getModifier(usePlatformProfiles);
int cs_code = env.getIntValue(csList);
if (usePlatform) {
cs = ColorSpace.getInstance(cs_code);
} else {
String resource = "profiles/";
switch (cs_code) {
case ColorSpace.CS_CIEXYZ:
resource += "CIEXYZ.pf";
break;
case ColorSpace.CS_GRAY:
resource += "GRAY.pf";
break;
case ColorSpace.CS_LINEAR_RGB:
resource += "LINEAR_RGB.pf";
break;
case ColorSpace.CS_PYCC:
resource += "PYCC.pf";
break;
case ColorSpace.CS_sRGB:
resource += "sRGB.pf";
break;
default:
throw new RuntimeException("Unknown color space: " + cs_code);
}
try {
InputStream is = CMMTests.class.getResourceAsStream(resource);
ICC_Profile p = ICC_Profile.getInstance(is);
cs = new ICC_ColorSpace(p);
} catch (IOException e) {
throw new RuntimeException("Unable load profile from resource " + resource, e);
}
}
return cs;
}