| |
|
| java.lang.Object javax.imageio.plugins.jpeg.JPEGHuffmanTable
JPEGHuffmanTable | public class JPEGHuffmanTable (Code) | | A class encapsulating a single JPEG Huffman table.
Fields are provided for the "standard" tables taken
from Annex K of the JPEG specification.
These are the tables used as defaults.
For more information about the operation of the standard JPEG plug-in,
see the JPEG
metadata format specification and usage notes
|
Constructor Summary | |
public | JPEGHuffmanTable(short[] lengths, short[] values) Creates a Huffman table and initializes it. |
Method Summary | |
public short[] | getLengths() Returns an array of short s containing the number of values
for each length in the Huffman table. | public short[] | getValues() Returns an array of short s containing the values arranged
by increasing length of their corresponding codes.
The interpretation of the array is dependent on the values returned
from getLengths . | public String | toString() Returns a
String representing this Huffman table. |
StdACChrominance | final public static JPEGHuffmanTable StdACChrominance(Code) | | The standard AC chrominance Huffman table.
|
StdACLuminance | final public static JPEGHuffmanTable StdACLuminance(Code) | | The standard AC luminance Huffman table.
|
StdDCChrominance | final public static JPEGHuffmanTable StdDCChrominance(Code) | | The standard DC chrominance Huffman table.
|
StdDCLuminance | final public static JPEGHuffmanTable StdDCLuminance(Code) | | The standard DC luminance Huffman table.
|
JPEGHuffmanTable | public JPEGHuffmanTable(short[] lengths, short[] values)(Code) | | Creates a Huffman table and initializes it. The input arrays are copied.
The arrays must describe a possible Huffman table.
For example, 3 codes cannot be expressed with a single bit.
Parameters: lengths - an array of short s where lengths[k] is equal to the number of values with corresponding codes oflength k + 1 bits. Parameters: values - an array of shorts containing the values inorder of increasing code length. throws: IllegalArgumentException - if lengths orvalues are null, the length of lengths isgreater than 16, the length of values is greater than 256,if any value in lengths or values is lessthan zero, or if the arrays do not describe a valid Huffman table. |
getLengths | public short[] getLengths()(Code) | | Returns an array of short s containing the number of values
for each length in the Huffman table. The returned array is a copy.
a short array where array[k-1] is equal to the number of values in the table of length k . See Also: JPEGHuffmanTable.getValues |
getValues | public short[] getValues()(Code) | | Returns an array of short s containing the values arranged
by increasing length of their corresponding codes.
The interpretation of the array is dependent on the values returned
from getLengths . The returned array is a copy.
a short array of values. See Also: JPEGHuffmanTable.getLengths |
toString | public String toString()(Code) | | Returns a
String representing this Huffman table.
a String representing this Huffman table. |
|
|
|