net.sourceforge.jiu.color.conversion
Class PCDYCbCrConversion
java.lang.Object
net.sourceforge.jiu.color.conversion.PCDYCbCrConversion
- All Implemented Interfaces:
- RGBIndex, YCbCrIndex
- public class PCDYCbCrConversion
- extends Object
- implements RGBIndex, YCbCrIndex
Convert from YCbCr color space (as used in Kodak PCD files) to
RGB. Only works for 24 bits per pixel (8 bits per channel) image
data.
- Author:
- Marco Schmidt
Method Summary |
static void |
convertYccToRgb(byte[] y,
byte[] cb,
byte[] cr,
int yccOffset,
byte[] r,
byte[] g,
byte[] b,
int rgbOffset,
int num)
Converts pixels from YCbCr to RGB color space.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
convertYccToRgb
public static void convertYccToRgb(byte[] y,
byte[] cb,
byte[] cr,
int yccOffset,
byte[] r,
byte[] g,
byte[] b,
int rgbOffset,
int num)
throws IllegalArgumentException
- Converts pixels from YCbCr to RGB color space.
Input pixels are given as three byte arrays for luminance and the
two chroma components.
Same for output pixels, three other arrays for red, green and blue.
Offset values can be specified separately for the YCbCr and the RGB
arrays.
- Parameters:
y
- the array of gray source samplescb
- the array of chroma blue source samplescr
- the array of chroma red source samplesyccOffset
- offset value into the arrays y, cb and cr; color
conversion will be started at the yccOffset'th value of each arrayr
- the array of red destination samplesg
- the array of green destination samplesb
- the array of blue destination samplesrgbOffset
- offset value into the arrays r, g and b; destination samples
will be written to the three arrays starting at the rgbOffset'th value of each arraynum
- the number of pixels to be converted
- Throws:
IllegalArgumentException
- if one of the int values is negative or one
of the arrays is null or too small
Copyright © 2000, 2001, 2002, 2003, 2004 Marco Schmidt