fi.faidon.jis
Class JPEGColor

java.lang.Object
  |
  +--fi.faidon.jis.JPEGColor

public class JPEGColor
extends java.lang.Object


Field Summary
static int CENTERJSAMPLE
           
static int CMYK_YCCK_CONVERT
           
 int colorConvert
           
static int GRAYSCALE_CONVERT
           
protected static int JCS_CMYK
           
protected static int JCS_GRAYSCALE
           
protected static int JCS_RGB
           
protected static int JCS_UNKNOWN
          Known color spaces.
protected static int JCS_YCbCr
           
protected static int JCS_YCCK
           
static int MAXJSAMPLE
           
static int NULL_CONVERT
          Color conversion modes.
static int NULL_METHOD
          Color treatment pass indicators.
static int RGB_BLUE
           
static int RGB_BLUE_MASK
           
static int RGB_GRAY_CONVERT
           
static int RGB_GREEN
           
static int RGB_GREEN_MASK
           
static int RGB_PIXELSIZE
           
static int RGB_RED
           
static int RGB_RED_MASK
           
static int RGB_YCC_CONVERT
           
static int RGB_YCC_START
           
 int startPass
           
 
Constructor Summary
JPEGColor(JPEGImageSaver cinfo)
          Module initialization routine for input colorspace conversion.
 
Method Summary
 void colorConvert(JPEGImageSaver cinfo, int[] inputBuf, java.util.Vector outputBuf, int outputRow, int numRows, int off, int scansize)
          Replaces the color_convert function pointer in the original C version.
 void rgbYccConvert(JPEGImageSaver cinfo, int[] inputBuf, java.util.Vector outputBuf, int outputRow, int numRows, int off, int scansize)
          Convert some rows of samples to the JPEG colorspace.
 void rgbYccStart(JPEGImageSaver cinfo)
          Initialize for RGB->YCC colorspace conversion.
 void startPass(JPEGImageSaver cinfo)
          Method that replaces the function pointes in the C JPEG implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RGB_RED

public static final int RGB_RED
See Also:
Constant Field Values

RGB_GREEN

public static final int RGB_GREEN
See Also:
Constant Field Values

RGB_BLUE

public static final int RGB_BLUE
See Also:
Constant Field Values

RGB_RED_MASK

public static final int RGB_RED_MASK
See Also:
Constant Field Values

RGB_GREEN_MASK

public static final int RGB_GREEN_MASK
See Also:
Constant Field Values

RGB_BLUE_MASK

public static final int RGB_BLUE_MASK
See Also:
Constant Field Values

RGB_PIXELSIZE

public static final int RGB_PIXELSIZE
See Also:
Constant Field Values

MAXJSAMPLE

public static final int MAXJSAMPLE
See Also:
Constant Field Values

CENTERJSAMPLE

public static final int CENTERJSAMPLE
See Also:
Constant Field Values

NULL_CONVERT

public static final int NULL_CONVERT
Color conversion modes.

See Also:
Constant Field Values

GRAYSCALE_CONVERT

public static final int GRAYSCALE_CONVERT
See Also:
Constant Field Values

RGB_GRAY_CONVERT

public static final int RGB_GRAY_CONVERT
See Also:
Constant Field Values

RGB_YCC_CONVERT

public static final int RGB_YCC_CONVERT
See Also:
Constant Field Values

CMYK_YCCK_CONVERT

public static final int CMYK_YCCK_CONVERT
See Also:
Constant Field Values

NULL_METHOD

public static final int NULL_METHOD
Color treatment pass indicators.

See Also:
Constant Field Values

RGB_YCC_START

public static final int RGB_YCC_START
See Also:
Constant Field Values

colorConvert

public int colorConvert

startPass

public int startPass

JCS_UNKNOWN

protected static final int JCS_UNKNOWN
Known color spaces.

See Also:
Constant Field Values

JCS_GRAYSCALE

protected static final int JCS_GRAYSCALE
See Also:
Constant Field Values

JCS_RGB

protected static final int JCS_RGB
See Also:
Constant Field Values

JCS_YCbCr

protected static final int JCS_YCbCr
See Also:
Constant Field Values

JCS_CMYK

protected static final int JCS_CMYK
See Also:
Constant Field Values

JCS_YCCK

protected static final int JCS_YCCK
See Also:
Constant Field Values
Constructor Detail

JPEGColor

public JPEGColor(JPEGImageSaver cinfo)
          throws java.io.IOException
Module initialization routine for input colorspace conversion. See jinit_color_converter in jccolor.c of IJG Jpeg-6a library.

Method Detail

startPass

public void startPass(JPEGImageSaver cinfo)
               throws java.io.IOException
Method that replaces the function pointes in the C JPEG implementation.

java.io.IOException

rgbYccStart

public void rgbYccStart(JPEGImageSaver cinfo)
                 throws java.io.IOException
Initialize for RGB->YCC colorspace conversion. We pre-calculate all the possible values, so that we only need to do a table lookup afterwards. See rgb_ycc_start in jccolor.c of IJG Jpeg-6a library.

java.io.IOException

colorConvert

public void colorConvert(JPEGImageSaver cinfo,
                         int[] inputBuf,
                         java.util.Vector outputBuf,
                         int outputRow,
                         int numRows,
                         int off,
                         int scansize)
                  throws java.io.IOException
Replaces the color_convert function pointer in the original C version.

java.io.IOException

rgbYccConvert

public void rgbYccConvert(JPEGImageSaver cinfo,
                          int[] inputBuf,
                          java.util.Vector outputBuf,
                          int outputRow,
                          int numRows,
                          int off,
                          int scansize)
                   throws java.io.IOException
Convert some rows of samples to the JPEG colorspace. Note that we change from the application's interleaved-pixel format to our internal noninterleaved, one-plane-per-component format. The input buffer is therefore three times as wide as the output buffer. A starting row offset is provided only for the output buffer. The caller can easily adjust the passed input_buf value to accommodate any row offset required on that side. See rgb_ycc_convert in jccolor.c of IJG Jpeg-6a library.

java.io.IOException