|
Whole document tree
com.sun.image.codec.jpeg
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Fields inherited from interface com.sun.image.codec.jpeg.JPEGDecodeParam |
APP0_MARKER, APP1_MARKER, APP2_MARKER, APP3_MARKER, APP4_MARKER, APP5_MARKER, APP6_MARKER, APP7_MARKER, APP8_MARKER, APP9_MARKER, APPA_MARKER, APPB_MARKER, APPC_MARKER, APPD_MARKER, APPE_MARKER, APPF_MARKER, COLOR_ID_CMYK, COLOR_ID_GRAY, COLOR_ID_PYCC, COLOR_ID_PYCCA, COLOR_ID_RGB, COLOR_ID_RGBA, COLOR_ID_RGBA_INVERTED, COLOR_ID_UNKNOWN, COLOR_ID_YCbCr, COLOR_ID_YCbCrA, COLOR_ID_YCbCrA_INVERTED, COLOR_ID_YCCK, COMMENT_MARKER, DENSITY_UNIT_ASPECT_RATIO, DENSITY_UNIT_DOTS_CM, DENSITY_UNIT_DOTS_INCH, NUM_COLOR_ID, NUM_DENSITY_UNIT, NUM_TABLES |
| Method Summary | |
void |
addMarkerData(int marker,
byte[] data)
Appends 'data' to the array of byte[] associated with marker. |
Object |
clone()
|
void |
setACHuffmanComponentMapping(int component,
int table)
Sets the mapping between a component and it's AC Huffman Table. |
void |
setACHuffmanTable(int tableNum,
JPEGHuffmanTable huffTable)
Sets the AC Huffman coding table at index to the table provided. |
void |
setDCHuffmanComponentMapping(int component,
int table)
Sets the mapping between a component and it's DC Huffman Table. |
void |
setDCHuffmanTable(int tableNum,
JPEGHuffmanTable huffTable)
Sets the DC Huffman coding table at index to the table provided. |
void |
setDensityUnit(int unit)
Set the pixel size units This value is copied into the APP0 marker (if that marker is written). |
void |
setHorizontalSubsampling(int component,
int subsample)
Set the horizontal subsample factor for the given component. |
void |
setImageInfoValid(boolean flag)
Set the flag indicating the validity of the table information in the ParamBlock. |
void |
setMarkerData(int marker,
byte[][] data)
Sets the marker data to be written to the output data stream. |
void |
setQTable(int tableNum,
JPEGQTable qTable)
Sets the coefficient quantization tables at index passed. |
void |
setQTableComponentMapping(int component,
int table)
Sets the mapping between a component and it's Quantization Table. |
void |
setQuality(float quality,
boolean forceBaseline)
This creates new Quantization tables that replace the currently installed Quantization tables. |
void |
setRestartInterval(int restartInterval)
Set the MCUs per restart, or 0 for no restart markers. |
void |
setTableInfoValid(boolean flag)
Set the flag indicating the validity of the image information in the ParamBlock. |
void |
setVerticalSubsampling(int component,
int subsample)
Set the vertical subsample factor for the given component. |
void |
setXDensity(int density)
Set the horizontal pixel density This value is written into the APP0 marker. |
void |
setYDensity(int density)
Set the vertical pixel density. |
| Method Detail |
public Object clone()
clone in interface JPEGDecodeParamclone in class Object
public void setHorizontalSubsampling(int component,
int subsample)
component - The component being specified.subsample - The subsampling factor being specified.
public void setVerticalSubsampling(int component,
int subsample)
component - The component being specified.subsample - The subsampling factor being specified.
public void setQTable(int tableNum,
JPEGQTable qTable)
qtable - that will be used.tableNum - the index of the table to be set.
public void setDCHuffmanTable(int tableNum,
JPEGHuffmanTable huffTable)
huffTable - JPEGHuffmanTable that will be assigned
to index tableNum.tableNum - - the index of the table to be set.IllegalArgumentException - - thrown if the tableNum
is out of range. Index must range in value from 0 - 3.
public void setACHuffmanTable(int tableNum,
JPEGHuffmanTable huffTable)
huffTable - JPEGHuffmanTable that will be assigned
to index tableNum.tableNum - - the index of the table to be set.IllegalArgumentException - - thrown if the tableNum
is out of range. Index must range in value from 0 - 3.
public void setDCHuffmanComponentMapping(int component,
int table)
component - The component to set the mapping fortable - The DC Huffman table to use for component
public void setACHuffmanComponentMapping(int component,
int table)
component - The component to set the mapping fortable - The AC Huffman table to use for component
public void setQTableComponentMapping(int component,
int table)
component - The component to set the mapping fortable - The Quantization Table to use for componentpublic void setImageInfoValid(boolean flag)
public void setTableInfoValid(boolean flag)
public void setMarkerData(int marker,
byte[][] data)
marker - The marker to set the data for.data - the new set of data to be written.
public void addMarkerData(int marker,
byte[] data)
marker - The marker to add and instance of.data - the data to be written.public void setRestartInterval(int restartInterval)
restartInterval - number MCUs per restart marker.public void setDensityUnit(int unit)
units - One of the DENSITY_UNIT_* values.public void setXDensity(int density)
desnity - the horizontal pixel density, in units
described by @see JPEGParam.getDensityUnit.public void setYDensity(int density)
density - The verticle pixel density, in units
described by @see JPEGParam.getDensityUnit.
public void setQuality(float quality,
boolean forceBaseline)
At a quality level of 1.0 the table will be all 1's which will lead to no loss of data due to quantization (however chrominace subsampling, if used, and roundoff error in the DCT will still degrade the image some what).
This is a linear manipulation of the standard Chrominance Q-Table.
Some guidelines: 0.75 high quality
0.5 medium quality
0.25 low quality
quality - 0.0-1.0 setting of desired quality level.forceBaseline - force baseline quantization table
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||