javax.imageio.plugins.jpeg
public class JPEGImageWriteParam extends ImageWriteParam
Constructor Summary | |
---|---|
JPEGImageWriteParam(Locale locale)
Construct a JPEGImageWriteParam with the following state: tiling
is not supported, progressive mode is supported, initial
progressive mode is MODE_DISABLED, compression is supported, one
compression type named "JPEG" is supported and the default
compression quality is 0.75f. |
Method Summary | |
---|---|
boolean | areTablesSet()
Check if the encoding tables are set.
|
JPEGHuffmanTable[] | getACHuffmanTables()
Retrieve the AC Huffman tables.
|
String[] | getCompressionQualityDescriptions()
Retrieve an array of compression quality descriptions. |
float[] | getCompressionQualityValues()
Retrieve an array of compression quality values, ordered from
lowest quality to highest quality.
|
JPEGHuffmanTable[] | getDCHuffmanTables()
Retrieve the DC Huffman tables.
|
boolean | getOptimizeHuffmanTables()
Check whether or not Huffman tables written to the output stream
will be optimized. |
JPEGQTable[] | getQTables()
Retrieve the quantization tables.
|
boolean | isCompressionLossless()
Check if compression algorithm is lossless. |
void | setEncodeTables(JPEGQTable[] qTables, JPEGHuffmanTable[] DCHuffmanTables, JPEGHuffmanTable[] ACHuffmanTables)
Set the quantization and Huffman tables that will be used to
encode the stream. |
void | setOptimizeHuffmanTables(boolean optimize)
Specify whether or not Huffman tables written to the output
stream should be optimized. |
void | unsetCompression()
Reset the compression quality to 0.75f. |
void | unsetEncodeTables()
Clear the quantization and Huffman encoding tables. |
Parameters: locale the locale used for message localization
Returns: true if the encoding tables are set, false otherwise
Returns: an array of JPEG AC Huffman tables
Returns: an array of strings each of which describes a compression quality value
Returns: an array of compressions quality values
Returns: an array of JPEG DC Huffman tables
Returns: true Huffman tables written to the output stream will be optimized, false otherwise
UNKNOWN: an array of JPEG quantization tables
Returns: false
Parameters: qTables JPEG quantization tables DCHuffmanTables JPEG DC Huffman tables ACHuffmanTables JPEG AC Huffman tables
Throws: IllegalArgumentException if any argument is null, if any of the arrays are longer than four elements, or if the Huffman table arrays do not have the same number of elements
Parameters: optimize true to generate optimized Huffman tables, false otherwise