Class ICCColorSpaceWithIntent

  • All Implemented Interfaces:
    java.io.Serializable, ColorSpaceOrigin

    public class ICCColorSpaceWithIntent
    extends java.awt.color.ICC_ColorSpace
    implements ColorSpaceOrigin
    This class extends the ICCColorSpace class by providing convenience methods to convert to sRGB using various methods, forcing a given intent, such as perceptual or relative colorimetric. It also additionally holds the name and source URI of the color profile.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private RenderingIntent intent  
      private java.lang.String profileName  
      private java.lang.String profileURI  
      private static long serialVersionUID  
      (package private) static java.awt.color.ColorSpace SRGB  
      • Fields inherited from class java.awt.color.ColorSpace

        CS_CIEXYZ, CS_GRAY, CS_LINEAR_RGB, CS_PYCC, CS_sRGB, TYPE_2CLR, TYPE_3CLR, TYPE_4CLR, TYPE_5CLR, TYPE_6CLR, TYPE_7CLR, TYPE_8CLR, TYPE_9CLR, TYPE_ACLR, TYPE_BCLR, TYPE_CCLR, TYPE_CMY, TYPE_CMYK, TYPE_DCLR, TYPE_ECLR, TYPE_FCLR, TYPE_GRAY, TYPE_HLS, TYPE_HSV, TYPE_Lab, TYPE_Luv, TYPE_RGB, TYPE_XYZ, TYPE_YCbCr, TYPE_Yxy
    • Constructor Summary

      Constructors 
      Constructor Description
      ICCColorSpaceWithIntent​(java.awt.color.ICC_Profile p, RenderingIntent intent, java.lang.String profileName, java.lang.String profileURI)
      Creates a new ICC-based color space.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private float[] absoluteColorimetricToRGB​(float[] values)
      Absolute colorimetric.
      java.lang.String getProfileName()
      Returns the name of the profile used to identify the color space in a particular context.
      java.lang.String getProfileURI()
      Returns the URI identifying the associate color profile.
      float[] intendedToRGB​(float[] values)
      Returns the sRGB value obtained by forcing the conversion method to the intent passed to the constructor.
      private float[] perceptualToRGB​(float[] values)
      Perceptual conversion is the method implemented by the base class's toRGB method
      private float[] relativeColorimetricToRGB​(float[] values)
      Relative colorimetric needs to happen through CIEXYZ conversion.
      private float[] saturationToRGB​(float[] values)
      Saturation.
      • Methods inherited from class java.awt.color.ICC_ColorSpace

        fromCIEXYZ, fromRGB, getMaxValue, getMinValue, getProfile, toCIEXYZ, toRGB
      • Methods inherited from class java.awt.color.ColorSpace

        getInstance, getName, getNumComponents, getType, isCS_sRGB
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • SRGB

        static final java.awt.color.ColorSpace SRGB
      • profileName

        private java.lang.String profileName
      • profileURI

        private java.lang.String profileURI
    • Constructor Detail

      • ICCColorSpaceWithIntent

        public ICCColorSpaceWithIntent​(java.awt.color.ICC_Profile p,
                                       RenderingIntent intent,
                                       java.lang.String profileName,
                                       java.lang.String profileURI)
        Creates a new ICC-based color space.
        Parameters:
        p - the color profile
        intent - the overriding rendering intent (use RenderingIntent.AUTO to preserve the profile's)
        profileName - the color profile name
        profileURI - the source URI of the color profile
    • Method Detail

      • intendedToRGB

        public float[] intendedToRGB​(float[] values)
        Returns the sRGB value obtained by forcing the conversion method to the intent passed to the constructor.
        Parameters:
        values - the color values in the local color space
        Returns:
        the sRGB values
      • perceptualToRGB

        private float[] perceptualToRGB​(float[] values)
        Perceptual conversion is the method implemented by the base class's toRGB method
        Parameters:
        values - the color values in the local color space
        Returns:
        the sRGB values
      • relativeColorimetricToRGB

        private float[] relativeColorimetricToRGB​(float[] values)
        Relative colorimetric needs to happen through CIEXYZ conversion.
        Parameters:
        values - the color values in the local color space
        Returns:
        the sRGB values
      • absoluteColorimetricToRGB

        private float[] absoluteColorimetricToRGB​(float[] values)
        Absolute colorimetric. NOT IMPLEMENTED. Temporarily returns same as perceptual.
        Parameters:
        values - the color values in the local color space
        Returns:
        the sRGB values
      • saturationToRGB

        private float[] saturationToRGB​(float[] values)
        Saturation. NOT IMPLEMENTED. Temporarily returns same as perceptual.
        Parameters:
        values - the color values in the local color space
        Returns:
        the sRGB values
      • getProfileName

        public java.lang.String getProfileName()
        Returns the name of the profile used to identify the color space in a particular context.
        Specified by:
        getProfileName in interface ColorSpaceOrigin
        Returns:
        the profile name
      • getProfileURI

        public java.lang.String getProfileURI()
        Returns the URI identifying the associate color profile.
        Specified by:
        getProfileURI in interface ColorSpaceOrigin
        Returns:
        the profile URI