Class NamedColorProfileParser
java.lang.Object
org.apache.xmlgraphics.java2d.color.profile.NamedColorProfileParser
This class is a parser for ICC named color profiles. It uses Java's
ICC_Profile
class
for parsing the basic structure but adds functionality to parse certain profile tags.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate String
getCopyright
(ICC_Profile profile) private String
getProfileDescription
(ICC_Profile profile) private RenderingIntent
getRenderingIntent
(ICC_Profile profile) static boolean
isNamedColorProfile
(ICC_Profile profile) Indicates whether the profile is a named color profile.parseProfile
(ICC_Profile profile) Parses a named color profile (NCP).parseProfile
(ICC_Profile profile, String profileName, String profileURI) Parses a named color profile (NCP).private String
private String
private NamedColorSpace[]
readNamedColors
(ICC_Profile profile, String profileName, String profileURI) private String
readSimpleString
(byte[] tag) private int[]
readUInt16Array
(DataInput din, int count) private String
toSignatureString
(int sig)
-
Field Details
-
MLUC
private static final int MLUC- See Also:
-
NCL2
private static final int NCL2- See Also:
-
-
Constructor Details
-
NamedColorProfileParser
public NamedColorProfileParser()
-
-
Method Details
-
isNamedColorProfile
Indicates whether the profile is a named color profile.- Parameters:
profile
- the color profile- Returns:
- true if the profile is a named color profile, false otherwise
-
parseProfile
public NamedColorProfile parseProfile(ICC_Profile profile, String profileName, String profileURI) throws IOException Parses a named color profile (NCP).- Parameters:
profile
- the profile to analyzeprofileName
- Optional profile name associated with this color profileprofileURI
- Optional profile URI associated with this color profile- Returns:
- an object representing the parsed NCP
- Throws:
IOException
- if an I/O error occurs
-
parseProfile
Parses a named color profile (NCP).- Parameters:
profile
- the profile to analyze- Returns:
- an object representing the parsed NCP
- Throws:
IOException
- if an I/O error occurs
-
getProfileDescription
- Throws:
IOException
-
getCopyright
- Throws:
IOException
-
getRenderingIntent
- Throws:
IOException
-
readNamedColors
private NamedColorSpace[] readNamedColors(ICC_Profile profile, String profileName, String profileURI) throws IOException - Throws:
IOException
-
readUInt16Array
- Throws:
IOException
-
readAscii
- Throws:
IOException
-
readSimpleString
- Throws:
IOException
-
readMLUC
- Throws:
IOException
-
toSignatureString
-