com.sun.pdfview.colorspace

Class LabColor

public class LabColor extends ColorSpace

A ColorSpace for Lab color
Constructor Summary
LabColor(PDFObject obj)
Create a new Lab color space object, given the description in a PDF dictionary.
Method Summary
float[]fromCIEXYZ(float[] colorvalue)
convert from CIEXYZ to Lab.
float[]fromRGB(float[] rgbvalue)
convert from RGB to Lab.
floatstage2(float s1)
Stage 2 of the conversion algorithm.
float[]toCIEXYZ(float[] colorvalue)
convert from Lab to CIEXYZ.
float[]toRGB(float[] comp)
convert from Lab to RGB

Constructor Detail

LabColor

public LabColor(PDFObject obj)
Create a new Lab color space object, given the description in a PDF dictionary.

Parameters: obj a dictionary that contains an Array of 3 Numbers for "WhitePoint" and "BlackPoint", and an array of 4 Numbers for "Range".

Method Detail

fromCIEXYZ

public float[] fromCIEXYZ(float[] colorvalue)
convert from CIEXYZ to Lab. NOT IMPLEMENTED

fromRGB

public float[] fromRGB(float[] rgbvalue)
convert from RGB to Lab. NOT IMPLEMENTED

stage2

public final float stage2(float s1)
Stage 2 of the conversion algorithm. Pulled out because it gets invoked for each component

toCIEXYZ

public float[] toCIEXYZ(float[] colorvalue)
convert from Lab to CIEXYZ. NOT IMPLEMENTED

toRGB

public float[] toRGB(float[] comp)
convert from Lab to RGB

Parameters: comp the Lab values (0-1)

Returns: the RGB values (0-1)