Minor clean up and doc changes.

This commit is contained in:
Harald Kuhr 2011-02-16 22:11:03 +01:00
parent 4d9661f950
commit d772674223

View File

@ -165,7 +165,7 @@ public final class ColorSpaces {
// TODO: Document how to download, install and configure Adobe color profiles or other profiles // TODO: Document how to download, install and configure Adobe color profiles or other profiles
/** /**
* Gets or creates the color space specified by the given color space constant. * Returns the color space specified by the given color space constant.
* <p /> * <p />
* For standard Java color spaces, the built-in instance is returned. * For standard Java color spaces, the built-in instance is returned.
* Otherwise, color spaces are looked up from cache and created on demand. * Otherwise, color spaces are looked up from cache and created on demand.
@ -196,7 +196,8 @@ public final class ColorSpaces {
catch (IOException ignore) { catch (IOException ignore) {
} }
// Fall back to the bundled ClayRGB1998 public domain Adobe RGB 1998 compatible profile // Fall back to the bundled ClayRGB1998 public domain Adobe RGB 1998 compatible profile,
// identical for all practical purposes
InputStream stream = ColorSpaces.class.getResourceAsStream("/profiles/ClayRGB1998.icc"); InputStream stream = ColorSpaces.class.getResourceAsStream("/profiles/ClayRGB1998.icc");
try { try {
return createColorSpace(ICC_Profile.getInstance(stream)); return createColorSpace(ICC_Profile.getInstance(stream));
@ -207,7 +208,7 @@ public final class ColorSpaces {
FileUtil.close(stream); FileUtil.close(stream);
} }
// Should never happen... // Should never happen given we now bundle the profile...
throw new RuntimeException("Could not read AdobeRGB1998 profile"); throw new RuntimeException("Could not read AdobeRGB1998 profile");
case CS_GENERIC_CMYK: case CS_GENERIC_CMYK:
@ -215,7 +216,11 @@ public final class ColorSpaces {
// TODO: C:\Windows\System32\spool\drivers\color\RSWOP.icm for Windows Vista? // TODO: C:\Windows\System32\spool\drivers\color\RSWOP.icm for Windows Vista?
try { try {
// This works for OS X only // This works for OS X only
// return createColorSpace(ICC_Profile.getInstance("/C:/Windows/System32/spool/drivers/color/RSWOP.icm"));
return createColorSpace(ICC_Profile.getInstance("/System/Library/ColorSync/Profiles/Generic CMYK Profile.icc")); return createColorSpace(ICC_Profile.getInstance("/System/Library/ColorSync/Profiles/Generic CMYK Profile.icc"));
// return createColorSpace(ICC_Profile.getInstance("/Downloads/coated_FOGRA39L_argl.icc"));
// return createColorSpace(ICC_Profile.getInstance("/Downloads/RSWOP.icm"));
// return createColorSpace(ICC_Profile.getInstance("/Downloads/USWebCoatedSWOP.icc"));
} }
catch (IOException ignore) { catch (IOException ignore) {
} }