Class ColorProfileUtil
java.lang.Object
org.apache.xmlgraphics.java2d.color.profile.ColorProfileUtil
Helper methods for handling color profiles.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ICC_ProfilegetICC_Profile(byte[] data) Proxy method forICC_Profile.getInstance(byte[])that properly synchronizes the call to avoid a potential race condition.static ICC_ProfilegetICC_Profile(int colorSpace) Proxy method forICC_Profile.getInstance(int)that properly synchronizes the call to avoid a potential race condition.static ICC_ProfileProxy method forICC_Profile.getInstance(java.io.InputStream)that properly synchronizes the call to avoid a potential race condition.static ICC_ProfilegetICC_Profile(String fileName) Proxy method forICC_Profile.getInstance(java.lang.String)that properly synchronizes the call to avoid a potential race condition.static StringgetICCProfileDescription(ICC_Profile profile) Returns the profile description of an ICC profilestatic booleanisDefaultsRGB(ICC_Profile profile) Indicates whether a given color profile is identical to the default sRGB profile provided by the Java class library.
-
Method Details
-
getICCProfileDescription
Returns the profile description of an ICC profile- Parameters:
profile- the profile- Returns:
- the description
-
isDefaultsRGB
Indicates whether a given color profile is identical to the default sRGB profile provided by the Java class library.- Parameters:
profile- the color profile to check- Returns:
- true if it is the default sRGB profile
-
getICC_Profile
Proxy method forICC_Profile.getInstance(byte[])that properly synchronizes the call to avoid a potential race condition.- Parameters:
data- the specified ICC Profile data- Returns:
- an
ICC_Profileinstance corresponding to the data in the specified byte array
-
getICC_Profile
Proxy method forICC_Profile.getInstance(int)that properly synchronizes the call to avoid a potential race condition.- Parameters:
colorSpace- the type of color space to create a profile for. The specified type is one of the color space constants defined in theColorSpaceclass.- Returns:
- an
ICC_Profileinstance corresponding to the specifiedColorSpace - Throws:
IllegalArgumentException- ifcolorSpaceis not one of the predefined types
-
getICC_Profile
Proxy method forICC_Profile.getInstance(java.io.InputStream)that properly synchronizes the call to avoid a potential race condition.- Parameters:
in- the input stream from which to read the profile data- Returns:
- an
ICC_Profileinstance corresponding to the data in the specifiedInputStream - Throws:
IOException- if an I/O error occurs while reading the streamIllegalArgumentException- if the stream does not contain valid ICC Profile data
-
getICC_Profile
Proxy method forICC_Profile.getInstance(java.lang.String)that properly synchronizes the call to avoid a potential race condition.- Parameters:
fileName- the name of the file that contains the profile data- Returns:
- an
ICC_Profileinstance corresponding to the data in the specified file - Throws:
IOException- if the file cannot be opened, or an I/O error occurs while reading the streamIllegalArgumentException- if the stream does not contain valid ICC Profile dataSecurityException- if a security manager is installed and it does not permit read access to the given file.
-