java.awt.color

Class ICC_ProfileRGB

public class ICC_ProfileRGB extends ICC_Profile

ICC_ProfileRGB - a special case of ICC_Profiles. The ICC_Profile.getInstance() method will return an instance of the ICC_ProfileRGB subclass when all the following conditions are met: The device color space of the profile is TYPE_RGB. The profile contains red, green and blue ColorantTags. The profile contains red, green and blue TRCTags. The profile contains a mediaWhitePointTag included. As per the ICC specification, the color space conversion can then be done through the following method: linearR = redTRC[deviceR] linearG = greenTRC[deviceG] linearB = blueTRC[deviceB] TRC curves are either a single gamma value, or a 1-dimensional lookup table. Followed by the matrix transform: PCS = M*linear Where PCS is the vector of profile color space (must be XYZ) coordinates, linear is the vector of linear RGB coordinates, and the matrix M is constructed from the ColorantTags, where the columns are red, green and blue respectively, and the rows are X, Y and Z. Note that if the profile contains a CLUT for the color space conversion, it should be used instead, and the TRC information ignored.

Since: 1.2

Field Summary
static intBLUECOMPONENT
static intGREENCOMPONENT
static intREDCOMPONENT
Method Summary
floatgetGamma(int component)
Returns the gamma value of a component
float[][]getMatrix()
Returns the colorant matrix of the conversion.
float[]getMediaWhitePoint()
Returns the media white point of the profile.
short[]getTRC(int component)
Returns the TRC lookup table for a component

Field Detail

BLUECOMPONENT

public static final int BLUECOMPONENT

GREENCOMPONENT

public static final int GREENCOMPONENT

REDCOMPONENT

public static final int REDCOMPONENT

Method Detail

getGamma

public float getGamma(int component)
Returns the gamma value of a component

Throws: ProfileDataException if the TRC is described by a lookup table and not a gamma value.

getMatrix

public float[][] getMatrix()
Returns the colorant matrix of the conversion.

getMediaWhitePoint

public float[] getMediaWhitePoint()
Returns the media white point of the profile.

getTRC

public short[] getTRC(int component)
Returns the TRC lookup table for a component

Throws: ProfileDataException if the TRC is described by a gamma value and not a lookup table.