public final class ColorSpaces extends Object
Standard ICC color profiles are read from system-specific locations for known operating systems.
Color profiles may be configured by placing a property-file
com/twelvemonkeys/imageio/color/icc_profiles.properties
on the classpath, specifying the full path to the profiles.
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
| Modifier and Type | Field and Description |
|---|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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_GRAY(ICC_Profile profile)
Deprecated.
Use
ColorProfiles.isCS_GRAY(ICC_Profile) instead. |
static boolean |
isCS_sRGB(ICC_Profile profile)
Deprecated.
Use
ColorProfiles.isCS_sRGB(ICC_Profile) instead. |
static ICC_Profile |
validateProfile(ICC_Profile profile)
Deprecated.
Use
ColorProfiles.validateProfile(ICC_Profile) instead. |
public static final int CS_ADOBE_RGB_1998
public static final int CS_GENERIC_CMYK
public static ICC_ColorSpace createColorSpace(ICC_Profile profile)
For standard Java color spaces, the built-in instance is returned. Otherwise, color spaces are looked up from cache and created on demand.
profile - the ICC color profile. May not be null.IllegalArgumentException - if profile is null.CMMException - if profile is invalid.@Deprecated public static boolean isCS_sRGB(ICC_Profile profile)
ColorProfiles.isCS_sRGB(ICC_Profile) instead.@Deprecated public static boolean isCS_GRAY(ICC_Profile profile)
ColorProfiles.isCS_GRAY(ICC_Profile) instead.@Deprecated public static ICC_Profile validateProfile(ICC_Profile profile)
ColorProfiles.validateProfile(ICC_Profile) instead.public static ColorSpace getColorSpace(int colorSpace)
For standard Java color spaces, the built-in instance is returned. Otherwise, color spaces are looked up from cache and created on demand.
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_CMYKCopyright © 2022. All rights reserved.