public class CMYKConversion
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
private |
CMYKConversion() |
Modifier and Type | Method and Description |
---|---|
static void |
convertCMYK32InterleavedToRGB24Planar(byte[] cmyk,
int cmykOffset,
byte[] red,
int redOffset,
byte[] green,
int greenOffset,
byte[] blue,
int blueOffset,
int numPixels)
Converts a number of CMYK pixels stored in interleaved order (all samples of one pixel
together: CMYKCMYKCMYK...) to RGB pixels which are stored as planes (all red samples
together, etc.).
|
static void |
convertCMYK32PlanarToRGB24Planar(byte[] cyan,
int cyanOffset,
byte[] magenta,
int magentaOffset,
byte[] yellow,
int yellowOffset,
byte[] black,
int blackOffset,
byte[] red,
int redOffset,
byte[] green,
int greenOffset,
byte[] blue,
int blueOffset,
int numPixels) |
static void |
convertCMYK32ToRGB24(int cyan,
int magenta,
int yellow,
int black,
int[] rgb)
Converts a 32 bit CMYK pixel to a 24 bit RGB pixel.
|
private static int |
convertToByte(int value) |
private static int convertToByte(int value)
public static void convertCMYK32ToRGB24(int cyan, int magenta, int yellow, int black, int[] rgb)
RGBIndex
defines for them.cyan
- the cyan sample, must lie in the interval 0 to 255magenta
- the magenta sample, must lie in the interval 0 to 255yellow
- the yellow sample, must lie in the interval 0 to 255black
- the black sample, must lie in the interval 0 to 255rgb
- byte array for the destination R-G-B pixel, must have length 3 or larger, will be accessed using RGBIndex, each sample will lie in the interval 0 to 255public static void convertCMYK32InterleavedToRGB24Planar(byte[] cmyk, int cmykOffset, byte[] red, int redOffset, byte[] green, int greenOffset, byte[] blue, int blueOffset, int numPixels)
cmyk
- a byte array with numPixels times four samples stored in order C-M-Y-KcmykOffset
- the index of the first byte that is to be accessedred
- the byte array to which the red samples will be written by this methodredOffset
- the offset into the red array of the first sample to be writtengreen
- the byte array to which the green samples will be written by this methodgreenOffset
- the offset into the green array of the first sample to be writtenblue
- the byte array to which the blue samples will be written by this methodblueOffset
- the offset into the blue array of the first sample to be writtenpublic static void convertCMYK32PlanarToRGB24Planar(byte[] cyan, int cyanOffset, byte[] magenta, int magentaOffset, byte[] yellow, int yellowOffset, byte[] black, int blackOffset, byte[] red, int redOffset, byte[] green, int greenOffset, byte[] blue, int blueOffset, int numPixels)