JIU 0.14.3

net.sourceforge.jiu.color.conversion
Class CMYKConversion

java.lang.Object
  extended by net.sourceforge.jiu.color.conversion.CMYKConversion

public class CMYKConversion
extends Object

Convert from CMYK color space to RGB color space.

Since:
0.10.0
Author:
Marco Schmidt

Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

convertCMYK32ToRGB24

public 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. Red, green and blue sample will be written at the indexes that RGBIndex defines for them.

Parameters:
cyan - the cyan sample, must lie in the interval 0 to 255
magenta - the magenta sample, must lie in the interval 0 to 255
yellow - the yellow sample, must lie in the interval 0 to 255
black - the black sample, must lie in the interval 0 to 255
rgb - 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 255

convertCMYK32InterleavedToRGB24Planar

public 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.).

Parameters:
cmyk - a byte array with numPixels times four samples stored in order C-M-Y-K
cmykOffset - the index of the first byte that is to be accessed
red - the byte array to which the red samples will be written by this method
redOffset - the offset into the red array of the first sample to be written
green - the byte array to which the green samples will be written by this method
greenOffset - the offset into the green array of the first sample to be written
blue - the byte array to which the blue samples will be written by this method
blueOffset - the offset into the blue array of the first sample to be written

convertCMYK32PlanarToRGB24Planar

public 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)

JIU 0.14.3

Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Marco Schmidt