Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Class java.awt.image.codec.JPEGQTable

java.lang.Object
    |
    +----java.awt.image.codec.JPEGQTable

public class JPEGQTable
extends Object
implements Cloneable
Class to encapsulate the JPEG quantization tables


Field Summary
static int[]  std_chrominance_quant_tbl
This is the sample luminance quantization table given in the JPEG spec section K.1, but expressed in zigzag order.
static int[]  std_luminance_quant_tbl
This is the sample luminance quantization table given in the JPEG spec section K.1, but expressed in zigzag order.
 

Constructor Summary
 JPEGQTable()
Constructs an empty quantization table
 JPEGQTable(int[] table)
Constructs an quantization table with the array that was passed.
 

Method Summary
Object  clone()
Clones this table.
int[]  getTable()
Returns the current quantization table as an array of ints in zig zag order.
void  scaleTable(int factor, boolean force_baseline)
The values in the Quantization table are multiplied by scale_factor/100 and then clamped to the range 1..65535 (or to 1..255 if force_baseline is TRUE).
void  setTable(int[] table)
Sets a new quantization table with the array that was passed.
void  setUnorderedTable(int[] table)
Puts an array of qantization steps in zig-zag order and copies them to the Q table.
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

std_luminance_quant_tbl

protected static final int[] std_luminance_quant_tbl
This is the sample luminance quantization table given in the JPEG spec section K.1, but expressed in zigzag order. The spec says that the values given produce "good" quality, and when divided by 2, "very good" quality.

std_chrominance_quant_tbl

protected static final int[] std_chrominance_quant_tbl
This is the sample luminance quantization table given in the JPEG spec section K.1, but expressed in zigzag order. The spec says that the values given produce "good" quality, and when divided by 2, "very good" quality.
Constructor Detail

JPEGQTable

public JPEGQTable()
Constructs an empty quantization table

JPEGQTable

public JPEGQTable(int[] table)
Constructs an quantization table with the array that was passed.
Parameters:
table - - the new quantization table.
Method Detail

setTable

public void setTable(int[] table)
Sets a new quantization table with the array that was passed.
Parameters:
int[] - table - The new quantization table

setUnorderedTable

public void setUnorderedTable(int[] table)
Puts an array of qantization steps in zig-zag order and copies them to the Q table.
Parameters:
int[] - table - The new quantization table
Returns:
void.

getTable

public int[] getTable()
Returns the current quantization table as an array of ints in zig zag order.
Returns:
The quantization table.

scaleTable

public void scaleTable(int factor,
                       boolean force_baseline)
The values in the Quantization table are multiplied by scale_factor/100 and then clamped to the range 1..65535 (or to 1..255 if force_baseline is TRUE).
Parameters:
int - factor - the factor by which the table will be scaled
boolean - force_baseline - if true the scaling will be clamped to a range of 1.. 255

clone

public Object clone()
Clones this table.
Overrides:
clone in class Object

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.