|
JIU 0.12.0 Homepage | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jiu.color.conversion.LogLuvConversion
Convert from LogLuv color representation to RGB color space and from LogL to grayscale.
This implementation is based on the file tif_luv.c
which
is part of the TIFF library libtiff.
The original implementation was written by Greg W. Larson.
Learn more about the color type and its encoding on Greg's page LogLuv Encoding for TIFF Images.
Method Summary | |
static double |
convertLogL10toY(int p10)
Converts an unsigned 10 bit value (the argument must lie in the interval 0 to 1023) to a double luminance
(brightness) value between 0.0 and 1.0 .
|
static void |
convertLogL16toGray8(byte[] logl,
byte[] gray,
int num)
Converts a number of 16 bit LogL samples to 8 bit grayscale samples. |
static double |
convertLogL16toY(int p16)
Converts a signed 16 bit value (the argument must lie in the interval -32768 to 32767) to a double luminance
(brightness) value between 0.0 and 1.0 .
|
static void |
convertLogLuv24InterleavedtoRGB24Planar(byte[] logluv,
byte[] red,
byte[] green,
byte[] blue,
int num)
Converts a number of 24 bit LogLuv pixels to 24 bit RGB pixels. |
static void |
convertLogLuv32InterleavedtoRGB24Planar(byte[] logluv,
byte[] red,
byte[] green,
byte[] blue,
int num)
Converts a number of 32 bit LogLuv pixels to 24 bit RGB pixels. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static double convertLogL10toY(int p10)
double
luminance
(brightness) value between 0.0
and 1.0
.
This conversion is needed by both LogLuv to XYZ and LogL to grayscale.
p10
- input LogL value
public static double convertLogL16toY(int p16)
double
luminance
(brightness) value between 0.0
and 1.0
.
This conversion is needed by both LogLuv to XYZ and LogL to grayscale.
p16
- input LogL value
public static void convertLogLuv24InterleavedtoRGB24Planar(byte[] logluv, byte[] red, byte[] green, byte[] blue, int num)
logluv
byte array.
The first byte and the top two bits of the second are the LogL value, the remaining
14 bits are an index that encodes u and v.
logluv
- byte array with LogLuv data, must be at least num * 3 bytes largered
- the byte samples for the red channel will be written to this arraygreen
- the byte samples for the green channel will be written to this arrayblue
- the byte samples for the blue channel will be written to this arraynum
- number of pixels to be convertedpublic static void convertLogLuv32InterleavedtoRGB24Planar(byte[] logluv, byte[] red, byte[] green, byte[] blue, int num)
logluv
byte array.
The first two bytes represent the LogL value (most significant bytefirst), followed
by the u value and then the v value.
logluv
- byte array with LogLuv data, must be at least num * 4 bytes largered
- the byte samples for the red channel will be written to this arraygreen
- the byte samples for the green channel will be written to this arrayblue
- the byte samples for the blue channel will be written to this arraynum
- number of pixels to be convertedpublic static void convertLogL16toGray8(byte[] logl, byte[] gray, int num)
logl
- byte array with LogL samples, each 16 bit sample is stored as
two consecutive bytes in order most-significant-byte least-significant-byte (network byte order);
the array must be at least num * 2 entries largegray
- the byte array to which the converted samples will be writtennum
- the number of samples to be converted
|
JIU 0.12.0 Homepage | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |