Top Description Fields Constructors Methods
com.sun.imageio.plugins.common

public final Class SimpleCMYKColorSpace

extends ColorSpace
Class Inheritance
Imports
java.awt.color.ColorSpace, java.io.Serial

Singleton class representing a simple, mathematically defined CMYK color space.

Field Summary

Modifier and TypeField and Description
private ColorSpace
private static final double
power1

The exponent for gamma correction.

private static final long
serialVersionUID

Hides java.awt.color.ColorSpace.serialVersionUID.

Use serialVersionUID from JDK 9 for interoperability.
private static ColorSpace
Inherited from java.awt.color.ColorSpace:
CS_CIEXYZCS_GRAYCS_LINEAR_RGBCS_PYCCCS_sRGBTYPE_2CLRTYPE_3CLRTYPE_4CLRTYPE_5CLRTYPE_6CLRTYPE_7CLRTYPE_8CLRTYPE_9CLRTYPE_ACLRTYPE_BCLRTYPE_CCLRTYPE_CMYTYPE_CMYKTYPE_DCLRTYPE_ECLRTYPE_FCLRTYPE_GRAYTYPE_HLSTYPE_HSVTYPE_LabTYPE_LuvTYPE_RGBTYPE_XYZTYPE_YCbCrTYPE_Yxy

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
o
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public float[]
fromCIEXYZ(float[]
a float array with length of at least 3
xyzvalue
)

Implements abstract java.awt.color.ColorSpace.fromCIEXYZ.

Transforms a color value assumed to be in the CS_CIEXYZ conversion color space into this ColorSpace.

public float[]
fromRGB(float[]
a float array with length of at least 3
rgbvalue
)

Implements abstract java.awt.color.ColorSpace.fromRGB.

Transforms a color value assumed to be in the default CS_sRGB color space into this ColorSpace.

public static final synchronized ColorSpace
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public float[]
toCIEXYZ(float[]
a float array with length of at least the number of components in this ColorSpace
colorvalue
)

Implements abstract java.awt.color.ColorSpace.toCIEXYZ.

Transforms a color value assumed to be in this ColorSpace into the CS_CIEXYZ conversion color space.

public float[]
toRGB(float[]
a float array with length of at least the number of components in this ColorSpace
colorvalue
)

Implements abstract java.awt.color.ColorSpace.toRGB.

Transforms a color value assumed to be in this ColorSpace into a value in the default CS_sRGB color space.

Inherited from java.awt.color.ColorSpace:
getInstancegetMaxValuegetMinValuegetNamegetNumComponentsgetTypeisCS_sRGB

Field Detail

csRGBback to summary
private ColorSpace csRGB
power1back to summary
private static final double power1

The exponent for gamma correction.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.awt.color.ColorSpace.serialVersionUID.

Use serialVersionUID from JDK 9 for interoperability.

Annotations
@Serial
theInstanceback to summary
private static ColorSpace theInstance

Constructor Detail

SimpleCMYKColorSpaceback to summary
private SimpleCMYKColorSpace()

Method Detail

equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
o:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

fromCIEXYZback to summary
public float[] fromCIEXYZ(float[] xyzvalue)

Implements abstract java.awt.color.ColorSpace.fromCIEXYZ.

Doc from java.awt.color.ColorSpace.fromCIEXYZ.

Transforms a color value assumed to be in the CS_CIEXYZ conversion color space into this ColorSpace.

This method transforms color values using relative colorimetry, as defined by the International Color Consortium standard. This means that the XYZ argument values taken by this method are represented relative to the D50 white point of the CS_CIEXYZ color space. This representation is useful in a two-step color conversion process in which colors are transformed from an input color space to CS_CIEXYZ and then to an output color space. The color values returned by this method are not those that would produce the XYZ value passed to the method when measured by a colorimeter. If you have XYZ values corresponding to measurements made using current CIE recommended practices, they must be converted to D50 relative values before being passed to this method. See the fromCIEXYZ method of ICC_ColorSpace for further information.

Parameters
xyzvalue:float[]

a float array with length of at least 3

Returns:float[]

a float array with length equal to the number of components in this ColorSpace

fromRGBback to summary
public float[] fromRGB(float[] rgbvalue)

Implements abstract java.awt.color.ColorSpace.fromRGB.

Doc from java.awt.color.ColorSpace.fromRGB.

Transforms a color value assumed to be in the default CS_sRGB color space into this ColorSpace.

This method transforms color values using algorithms designed to produce the best perceptual match between input and output colors. In order to do colorimetric conversion of color values, you should use the toCIEXYZ method of the CS_sRGB color space to first convert from the input color space to the CS_CIEXYZ color space, and then use the fromCIEXYZ method of this color space to convert from CS_CIEXYZ to the output color space. See toCIEXYZ and fromCIEXYZ for further information.

Parameters
rgbvalue:float[]

a float array with length of at least 3

Returns:float[]

a float array with length equal to the number of components in this ColorSpace

getInstanceback to summary
public static final synchronized ColorSpace getInstance()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

toCIEXYZback to summary
public float[] toCIEXYZ(float[] colorvalue)

Implements abstract java.awt.color.ColorSpace.toCIEXYZ.

Doc from java.awt.color.ColorSpace.toCIEXYZ.

Transforms a color value assumed to be in this ColorSpace into the CS_CIEXYZ conversion color space.

This method transforms color values using relative colorimetry, as defined by the International Color Consortium standard. This means that the XYZ values returned by this method are represented relative to the D50 white point of the CS_CIEXYZ color space. This representation is useful in a two-step color conversion process in which colors are transformed from an input color space to CS_CIEXYZ and then to an output color space. This representation is not the same as the XYZ values that would be measured from the given color value by a colorimeter. A further transformation is necessary to compute the XYZ values that would be measured using current CIE recommended practices. See the toCIEXYZ method of ICC_ColorSpace for further information.

Parameters
colorvalue:float[]

a float array with length of at least the number of components in this ColorSpace

Returns:float[]

a float array of length 3

toRGBback to summary
public float[] toRGB(float[] colorvalue)

Implements abstract java.awt.color.ColorSpace.toRGB.

Doc from java.awt.color.ColorSpace.toRGB.

Transforms a color value assumed to be in this ColorSpace into a value in the default CS_sRGB color space.

This method transforms color values using algorithms designed to produce the best perceptual match between input and output colors. In order to do colorimetric conversion of color values, you should use the toCIEXYZ method of this color space to first convert from the input color space to the CS_CIEXYZ color space, and then use the fromCIEXYZ method of the CS_sRGB color space to convert from CS_CIEXYZ to the output color space. See toCIEXYZ and fromCIEXYZ for further information.

Parameters
colorvalue:float[]

a float array with length of at least the number of components in this ColorSpace

Returns:float[]

a float array of length 3