Class NamedColorProfileParser


  • public class NamedColorProfileParser
    extends java.lang.Object
    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 
      Modifier and Type Field Description
      private static int MLUC  
      private static int NCL2  
    • Constructor Detail

      • NamedColorProfileParser

        public NamedColorProfileParser()
    • Method Detail

      • isNamedColorProfile

        public static boolean isNamedColorProfile​(java.awt.color.ICC_Profile profile)
        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​(java.awt.color.ICC_Profile profile,
                                              java.lang.String profileName,
                                              java.lang.String profileURI)
                                       throws java.io.IOException
        Parses a named color profile (NCP).
        Parameters:
        profile - the profile to analyze
        profileName - Optional profile name associated with this color profile
        profileURI - Optional profile URI associated with this color profile
        Returns:
        an object representing the parsed NCP
        Throws:
        java.io.IOException - if an I/O error occurs
      • parseProfile

        public NamedColorProfile parseProfile​(java.awt.color.ICC_Profile profile)
                                       throws java.io.IOException
        Parses a named color profile (NCP).
        Parameters:
        profile - the profile to analyze
        Returns:
        an object representing the parsed NCP
        Throws:
        java.io.IOException - if an I/O error occurs
      • getProfileDescription

        private java.lang.String getProfileDescription​(java.awt.color.ICC_Profile profile)
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • getCopyright

        private java.lang.String getCopyright​(java.awt.color.ICC_Profile profile)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • getRenderingIntent

        private RenderingIntent getRenderingIntent​(java.awt.color.ICC_Profile profile)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • readNamedColors

        private NamedColorSpace[] readNamedColors​(java.awt.color.ICC_Profile profile,
                                                  java.lang.String profileName,
                                                  java.lang.String profileURI)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • readUInt16Array

        private int[] readUInt16Array​(java.io.DataInput din,
                                      int count)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • readAscii

        private java.lang.String readAscii​(java.io.DataInput in,
                                           int maxLength)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • readSimpleString

        private java.lang.String readSimpleString​(byte[] tag)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • readMLUC

        private java.lang.String readMLUC​(java.io.DataInput din)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • toSignatureString

        private java.lang.String toSignatureString​(int sig)