This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.imageio.plugins.jpeg
class JPEGQTable

java.lang.Object extended by javax.imageio.plugins.jpeg.JPEGQTable

public class JPEGQTable
extends Object

A class encapsulating a single JPEG quantization table. The elements appear in natural order (as opposed to zig-zag order). Static variables are provided for the "standard" tables taken from Annex K of the JPEG spec, as well as the default tables conventionally used for visually lossless encoding.

For more information about the operation of the built-in JPEG plug-ins, see the JPEG metadata format specification and usage notes.


Field Summary
static JPEGQTable K1Div2Luminance
          The sample luminance quantization table given in the JPEG specification, table K.1, with all elements divided by 2.
static JPEGQTable K1Luminance
          The sample luminance quantization table given in the JPEG specification, table K.1.
static JPEGQTable K2Chrominance
          The sample chrominance quantization table given in the JPEG specification, table K.2.
static JPEGQTable K2Div2Chrominance
          The sample chrominance quantization table given in the JPEG specification, table K.2, with all elements divided by 2.
 
Constructor Summary
JPEGQTable(int[] table)

          Constructs a quantization table from the argument, which must contain 64 elements in natural order (not zig-zag order).
 
Method Summary
 JPEGQTable
getScaledInstance(float scaleFactor, boolean forceBaseline)

          Returns a new quantization table where the values are multiplied by scaleFactor and then clamped to the range 1..32767 (or to 1..255 if forceBaseline is true).
 int[]

          Returns a copy of the current quantization table as an array of ints in natural (not zig-zag) order.
 String

          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

K1Div2Luminance

public static final JPEGQTable K1Div2Luminance
The sample luminance quantization table given in the JPEG specification, table K.1, with all elements divided by 2. According to the specification, these values produce "very good" quality output. This is the table usually used for "visually lossless" encoding, and is the default luminance table used if the default tables and quality settings are used.

K1Luminance

public static final JPEGQTable K1Luminance
The sample luminance quantization table given in the JPEG specification, table K.1. According to the specification, these values produce "good" quality output.

K2Chrominance

public static final JPEGQTable K2Chrominance
The sample chrominance quantization table given in the JPEG specification, table K.2. According to the specification, these values produce "good" quality output.

K2Div2Chrominance

public static final JPEGQTable K2Div2Chrominance
The sample chrominance quantization table given in the JPEG specification, table K.2, with all elements divided by 2. According to the specification, these values produce "very good" quality output. This is the table usually used for "visually lossless" encoding, and is the default chrominance table used if the default tables and quality settings are used.
Constructor Detail

JPEGQTable

public JPEGQTable(int[] table)
Constructs a quantization table from the argument, which must contain 64 elements in natural order (not zig-zag order). A copy is made of the the input array.

Parameters:
table - the quantization table, as an int array.
Method Detail

getScaledInstance

public JPEGQTable getScaledInstance(float scaleFactor,
                                    boolean forceBaseline)
Returns a new quantization table where the values are multiplied by scaleFactor and then clamped to the range 1..32767 (or to 1..255 if forceBaseline is true).

Values of scaleFactorless than 1 tend to improve the quality level of the table, and values greater than 1.0 degrade the quality level of the table.

Parameters:
scaleFactor - the multiplicative factor for the table.
forceBaseline - if true, the values will be clamped to the range 1..255.
Returns:
a new quantization table that is a linear multiple of the current table.

getTable

public int[] getTable()
Returns a copy of the current quantization table as an array of ints in natural (not zig-zag) order.

Returns:
A copy of the current quantization table.

toString

public String toString()
Overrides:
toString in class Object


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.