|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.twelvemonkeys.imageio.color.ColorSpaces
public final class ColorSpaces
A helper class for working with ICC color profiles and color spaces.
Standard ICC color profiles are read from system-specific locations for known operating systems. Color profiles may be configured by placing a property-filecom/twelvemonkeys/imageio/color/icc_profiles.properties
on the classpath, specifying the full path to the profile.
ICC color profiles are probably already present on your system, or
can be downloaded from
ICC,
Adobe or other places.
Example property file:
# icc_profiles.properties ADOBE_RGB_1998=/path/to/Adobe RGB 1998.icc GENERIC_CMYK=/path/to/Generic CMYK.icc
| Field Summary | |
|---|---|
static int |
CS_ADOBE_RGB_1998
The Adobe RGB 1998 (or compatible) color space. |
static int |
CS_GENERIC_CMYK
A best-effort "generic" CMYK color space. |
| Method Summary | |
|---|---|
static ICC_ColorSpace |
createColorSpace(ICC_Profile profile)
Creates an ICC color space from the given ICC color profile. |
static ColorSpace |
getColorSpace(int colorSpace)
Returns the color space specified by the given color space constant. |
static boolean |
isCS_sRGB(ICC_Profile profile)
Tests whether an ICC color profile is equal to the default sRGB profile. |
static boolean |
isOffendingColorProfile(ICC_Profile profile)
Tests whether an ICC color profile is known to cause problems for ColorConvertOp. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CS_ADOBE_RGB_1998
public static final int CS_GENERIC_CMYK
| Method Detail |
|---|
public static ICC_ColorSpace createColorSpace(ICC_Profile profile)
profile - the ICC color profile. May not be null.
IllegalArgumentException - if profile is nullpublic static boolean isCS_sRGB(ICC_Profile profile)
profile - the ICC profile to test. May not be null.
true if profile is equal to the default sRGB profile.
IllegalArgumentException - if profile is nullColorSpace.isCS_sRGB()public static boolean isOffendingColorProfile(ICC_Profile profile)
ColorConvertOp.
Note that this method only tests if a color conversion using this profile is known to fail.
There's no guarantee that the color conversion will succeed even if this method returns false.
profile - the ICC color profile. May not be null.
true if known to be offending, false otherwise
IllegalArgumentException - if profile is nullpublic static ColorSpace getColorSpace(int colorSpace)
colorSpace - the color space constant.
ColorSpace specified by the color space constant.
IllegalArgumentException - if colorSpace is not one of the defined color spaces (CS_*).ColorSpace,
CS_ADOBE_RGB_1998,
CS_GENERIC_CMYK
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||