Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

gnu.java.awt.color
Class LinearRGBConverter  view LinearRGBConverter download LinearRGBConverter.java

java.lang.Object
  extended bygnu.java.awt.color.LinearRGBConverter
All Implemented Interfaces:
ColorSpaceConverter

public class LinearRGBConverter
extends java.lang.Object
implements ColorSpaceConverter

LinearRGBConverter - conversion routines for a linear sRGB colorspace sRGB is a standard for RGB colorspaces, adopted by the w3c. The specification is available at: http://www.w3.org/Graphics/Color/sRGB.html


Constructor Summary
LinearRGBConverter()
           
 
Method Summary
 float[] fromCIEXYZ(float[] in)
          Linear RGB --> CIE XYZ (D50 relative) This is a simple matrix transform, the matrix (relative D65) is given in the sRGB spec.
 float[] fromRGB(float[] in)
          sRGB --> linear RGB Use the gamma curve (gamma=2.4 in sRGB)
 float[] toCIEXYZ(float[] in)
          Linear RGB --> CIE XYZ (D50 relative) Uses the inverse of the above matrix.
 float[] toRGB(float[] in)
          linear RGB --> sRGB Use the inverse gamma curve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearRGBConverter

public LinearRGBConverter()
Method Detail

toRGB

public float[] toRGB(float[] in)
linear RGB --> sRGB Use the inverse gamma curve

Specified by:
toRGB in interface ColorSpaceConverter

fromRGB

public float[] fromRGB(float[] in)
sRGB --> linear RGB Use the gamma curve (gamma=2.4 in sRGB)

Specified by:
fromRGB in interface ColorSpaceConverter

fromCIEXYZ

public float[] fromCIEXYZ(float[] in)
Linear RGB --> CIE XYZ (D50 relative) This is a simple matrix transform, the matrix (relative D65) is given in the sRGB spec. This has been combined with a linear Bradford transform for the D65-->D50 mapping, resulting in a single matrix which does the whole thing.

Specified by:
fromCIEXYZ in interface ColorSpaceConverter

toCIEXYZ

public float[] toCIEXYZ(float[] in)
Linear RGB --> CIE XYZ (D50 relative) Uses the inverse of the above matrix.

Specified by:
toCIEXYZ in interface ColorSpaceConverter