fi.faidon.jis
Class JPEGPrepController

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

public class JPEGPrepController
extends java.lang.Object

This file contains the compression preprocessing controller. This controller manages the color conversion, downsampling, and edge expansion steps. Most of the complexity here is associated with buffering input rows as required by the downsampler. See the comments at the head of jcsample.c for the downsampler's needs.

See Also:
of the IJG JPEG library Jpeg-6a.

Constructor Summary
JPEGPrepController(JPEGImageSaver cinfo, boolean needFullBuffer)
          Initialize preprocessing controller.
 
Method Summary
 void expandBottomEdge(int[][] imageData, int numCols, int inputRows, int outputRows)
          Expand an image vertically from height input_rows to height output_rows, by duplicating the bottom row.
 void preProcessData(JPEGImageSaver cinfo, int[] inputBuf, int[] rowCtrs, int inRowsAvail, java.util.Vector outputBuf, int outRowGroupsAvail, int off, int scansize)
          Process some data in the simple no-context case.
 void startPass(JPEGImageSaver cinfo, int passMode)
          Replaces start_pass function pointer in C implementation.
 void startPassPrep(JPEGImageSaver cinfo, int passMode)
          Initialize for a processing pass.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPEGPrepController

public JPEGPrepController(JPEGImageSaver cinfo,
                          boolean needFullBuffer)
                   throws java.io.IOException
Initialize preprocessing controller. See jinit_c_prep_controller in jcprep.c of IJG Jpeg-6a library.

Method Detail

startPass

public void startPass(JPEGImageSaver cinfo,
                      int passMode)
               throws java.io.IOException
Replaces start_pass function pointer in C implementation.

java.io.IOException

startPassPrep

public void startPassPrep(JPEGImageSaver cinfo,
                          int passMode)
                   throws java.io.IOException
Initialize for a processing pass. See start_pass_prep in jcprep.c of IJG Jpeg-6a library.

java.io.IOException

expandBottomEdge

public void expandBottomEdge(int[][] imageData,
                             int numCols,
                             int inputRows,
                             int outputRows)
                      throws java.io.IOException
Expand an image vertically from height input_rows to height output_rows, by duplicating the bottom row. See expand_bottom_edge in jcprep.c of IJG Jpeg-6a library.

java.io.IOException

preProcessData

public void preProcessData(JPEGImageSaver cinfo,
                           int[] inputBuf,
                           int[] rowCtrs,
                           int inRowsAvail,
                           java.util.Vector outputBuf,
                           int outRowGroupsAvail,
                           int off,
                           int scansize)
                    throws java.io.IOException
Process some data in the simple no-context case. Preprocessor output data is counted in "row groups". A row group is defined to be v_samp_factor sample rows of each component. Downsampling will produce this much data from each max_v_samp_factor input rows. Since Java doesn't use parameter passing by reference, we pass the two counters to update in the array rowCtrs instead. The original in_row_ctr is rowCtrs[0] and out_row_group_ctr is rowCtrs[1]. KF. See pre_process_data in jcprep.c of IJG Jpeg-6a library.

java.io.IOException