|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.imageio.IIOParam
javax.imageio.ImageReadParam
javax.imageio.plugins.jpeg.JPEGImageReadParam
public class JPEGImageReadParam
The JPEGImageReadParam class is only used to set JPEG decoding tables for streams that do not provide their own tables. If a stream does not provide tables and a custom JPEGImageReadParam is not provided, then the standard JPEG tables are used from the JPEGQTable and JPEGHuffmanTable classes. If a stream does provide decoding tables then JPEGImageReadParam will be ignored. JPEGImageReadParam cannot be used to retrieve the tables from a stream. Instead, use IIOMetadata for this purpose. A JPEGImageReadParam instance is retrieved from the built-in JPEG ImageReader using the getDefaultImageReadParam method.
Field Summary |
---|
Fields inherited from class javax.imageio.ImageReadParam |
---|
canSetSourceRenderSize, destination, destinationBands, minProgressivePass, numProgressivePasses, sourceRenderSize |
Fields inherited from class javax.imageio.IIOParam |
---|
controller, defaultController, destinationOffset, destinationType, sourceBands, sourceRegion, sourceXSubsampling, sourceYSubsampling, subsamplingXOffset, subsamplingYOffset |
Constructor Summary | |
---|---|
JPEGImageReadParam()
Construct a JPEGImageReadParam. |
Method Summary | |
---|---|
boolean |
areTablesSet()
Check if the decoding tables are set. |
JPEGHuffmanTable[] |
getACHuffmanTables()
Retrieve the AC Huffman tables. |
JPEGHuffmanTable[] |
getDCHuffmanTables()
Retrieve the DC Huffman tables. |
JPEGQTable[] |
getQTables()
Retrieve the quantization tables. |
void |
setDecodeTables(JPEGQTable[] qTables,
JPEGHuffmanTable[] DCHuffmanTables,
JPEGHuffmanTable[] ACHuffmanTables)
Set the quantization and Huffman tables that will be used to decode the stream. |
void |
unsetDecodeTables()
Clear the quantization and Huffman decoding tables. |
Methods inherited from class javax.imageio.ImageReadParam |
---|
canSetSourceRenderSize, getDestination, getDestinationBands, getSourceMaxProgressivePass, getSourceMinProgressivePass, getSourceNumProgressivePasses, getSourceRenderSize, setDestination, setDestinationBands, setSourceProgressivePasses, setSourceRenderSize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JPEGImageReadParam()
Method Detail |
---|
public boolean areTablesSet()
public void setDecodeTables(JPEGQTable[] qTables, JPEGHuffmanTable[] DCHuffmanTables, JPEGHuffmanTable[] ACHuffmanTables)
qTables
- JPEG quantization tablesDCHuffmanTables
- JPEG DC Huffman tablesACHuffmanTables
- JPEG AC Huffman tables
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 elementspublic void unsetDecodeTables()
public JPEGQTable[] getQTables()
public JPEGHuffmanTable[] getDCHuffmanTables()
public JPEGHuffmanTable[] getACHuffmanTables()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |