java.lang.Object
javax.imageio.IIOParam
javax.imageio.ImageReadParam
javax.imageio.plugins.jpeg.JPEGImageReadParam
- public class JPEGImageReadParam
- extends javax.imageio.ImageReadParam
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.
| Methods inherited from class javax.imageio.ImageReadParam |
canSetSourceRenderSize, getDestination, getDestinationBands, getSourceMaxProgressivePass, getSourceMinProgressivePass, getSourceNumProgressivePasses, getSourceRenderSize, setDestination, setDestinationBands, setSourceProgressivePasses, setSourceRenderSize |
| Methods inherited from class javax.imageio.IIOParam |
activateController, getController, getDefaultController, getDestinationOffset, getDestinationType, getSourceBands, getSourceRegion, getSourceXSubsampling, getSourceYSubsampling, getSubsamplingXOffset, getSubsamplingYOffset, hasController, setController, setDestinationOffset, setDestinationType, setSourceBands, setSourceRegion, setSourceSubsampling |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
qTables
private JPEGQTable[] qTables
DCHuffmanTables
private JPEGHuffmanTable[] DCHuffmanTables
ACHuffmanTables
private JPEGHuffmanTable[] ACHuffmanTables
JPEGImageReadParam
public JPEGImageReadParam()
- Construct a JPEGImageReadParam.
areTablesSet
public boolean areTablesSet()
- Check if the decoding tables are set.
setDecodeTables
public void setDecodeTables(JPEGQTable[] qTables,
JPEGHuffmanTable[] DCHuffmanTables,
JPEGHuffmanTable[] ACHuffmanTables)
- Set the quantization and Huffman tables that will be used to
decode the stream. Copies are created of the array arguments.
The number of Huffman tables must be the same in both Huffman
table arrays. No argument may be null and no array may be longer
than four elements.
unsetDecodeTables
public void unsetDecodeTables()
- Clear the quantization and Huffman decoding tables.
getQTables
public JPEGQTable[] getQTables()
- Retrieve the quantization tables.
getDCHuffmanTables
public JPEGHuffmanTable[] getDCHuffmanTables()
- Retrieve the DC Huffman tables.
getACHuffmanTables
public JPEGHuffmanTable[] getACHuffmanTables()
- Retrieve the AC Huffman tables.