Java Doc for JPEGImageReadParam.java in  » 6.0-JDK-Core » image » javax » imageio » plugins » jpeg » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » image » javax.imageio.plugins.jpeg 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.imageio.ImageReadParam
   javax.imageio.plugins.jpeg.JPEGImageReadParam

JPEGImageReadParam
public class JPEGImageReadParam extends ImageReadParam (Code)
This class adds the ability to set JPEG quantization and Huffman tables when using the built-in JPEG reader plug-in. An instance of this class will be returned from the getDefaultImageReadParam methods of the built-in JPEG ImageReader.

The sole purpose of these additions is to allow the specification of tables for use in decoding abbreviated streams. The built-in JPEG reader will also accept an ordinary ImageReadParam, which is sufficient for decoding non-abbreviated streams.

While tables for abbreviated streams are often obtained by first reading another abbreviated stream containing only the tables, in some applications the tables are fixed ahead of time. This class allows the tables to be specified directly from client code. If no tables are specified either in the stream or in a JPEGImageReadParam, then the stream is presumed to use the "standard" visually lossless tables. See JPEGQTableJPEGQTable and JPEGHuffmanTableJPEGHuffmanTable for more information on the default tables.

The default JPEGImageReadParam returned by the getDefaultReadParam method of the builtin JPEG reader contains no tables. Default tables may be obtained from the table classes JPEGQTable JPEGQTable and JPEGHuffmanTable JPEGHuffmanTable .

If a stream does contain tables, the tables given in a JPEGImageReadParam are ignored. Furthermore, if the first image in a stream does contain tables and subsequent ones do not, then the tables given in the first image are used for all the abbreviated images. Once tables have been read from a stream, they can be overridden only by tables subsequently read from the same stream. In order to specify new tables, the javax.imageio.ImageReader.setInput setInput method of the reader must be called to change the stream.

Note that this class does not provide a means for obtaining the tables found in a stream. These may be extracted from a stream by consulting the IIOMetadata object returned by the reader.

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




Constructor Summary
public  JPEGImageReadParam()
     Constructs a JPEGImageReadParam.

Method Summary
public  booleanareTablesSet()
     Returns true if tables are currently set.
public  JPEGHuffmanTable[]getACHuffmanTables()
     Returns a copy of the array of AC Huffman tables set on the most recent call to setDecodeTables, or null if tables are not currently set.
public  JPEGHuffmanTable[]getDCHuffmanTables()
     Returns a copy of the array of DC Huffman tables set on the most recent call to setDecodeTables, or null if tables are not currently set.
public  JPEGQTable[]getQTables()
     Returns a copy of the array of quantization tables set on the most recent call to setDecodeTables, or null if tables are not currently set.
public  voidsetDecodeTables(JPEGQTable[] qTables, JPEGHuffmanTable[] DCHuffmanTables, JPEGHuffmanTable[] ACHuffmanTables)
     Sets the quantization and Huffman tables to use in decoding abbreviated streams.
public  voidunsetDecodeTables()
     Removes any quantization and Huffman tables that are currently set.


Constructor Detail
JPEGImageReadParam
public JPEGImageReadParam()(Code)
Constructs a JPEGImageReadParam.




Method Detail
areTablesSet
public boolean areTablesSet()(Code)
Returns true if tables are currently set. true if tables are present.



getACHuffmanTables
public JPEGHuffmanTable[] getACHuffmanTables()(Code)
Returns a copy of the array of AC Huffman tables set on the most recent call to setDecodeTables, or null if tables are not currently set. an array of JPEGHuffmanTable objects, ornull.
See Also:   JPEGImageReadParam.setDecodeTables



getDCHuffmanTables
public JPEGHuffmanTable[] getDCHuffmanTables()(Code)
Returns a copy of the array of DC Huffman tables set on the most recent call to setDecodeTables, or null if tables are not currently set. an array of JPEGHuffmanTable objects, ornull.
See Also:   JPEGImageReadParam.setDecodeTables



getQTables
public JPEGQTable[] getQTables()(Code)
Returns a copy of the array of quantization tables set on the most recent call to setDecodeTables, or null if tables are not currently set. an array of JPEGQTable objects, ornull.
See Also:   JPEGImageReadParam.setDecodeTables



setDecodeTables
public void setDecodeTables(JPEGQTable[] qTables, JPEGHuffmanTable[] DCHuffmanTables, JPEGHuffmanTable[] ACHuffmanTables)(Code)
Sets the quantization and Huffman tables to use in decoding abbreviated streams. There may be a maximum of 4 tables of each type. These tables are ignored once tables are encountered in the stream. All arguments must be non-null. The two arrays of Huffman tables must have the same number of elements. The table specifiers in the frame and scan headers in the stream are assumed to be equivalent to indices into these arrays. The argument arrays are copied by this method.
Parameters:
  qTables - an array of quantization table objects.
Parameters:
  DCHuffmanTables - an array of Huffman table objects.
Parameters:
  ACHuffmanTables - an array of Huffman table objects.
exception:
  IllegalArgumentException - if any of the argumentsis null, has more than 4 elements, or if thenumbers of DC and AC tables differ.
See Also:   JPEGImageReadParam.unsetDecodeTables



unsetDecodeTables
public void unsetDecodeTables()(Code)
Removes any quantization and Huffman tables that are currently set.
See Also:   JPEGImageReadParam.setDecodeTables



Fields inherited from javax.imageio.ImageReadParam
protected boolean canSetSourceRenderSize(Code)(Java Doc)
protected BufferedImage destination(Code)(Java Doc)
protected int[] destinationBands(Code)(Java Doc)
protected int minProgressivePass(Code)(Java Doc)
protected int numProgressivePasses(Code)(Java Doc)
protected Dimension sourceRenderSize(Code)(Java Doc)

Methods inherited from javax.imageio.ImageReadParam
public boolean canSetSourceRenderSize()(Code)(Java Doc)
public BufferedImage getDestination()(Code)(Java Doc)
public int[] getDestinationBands()(Code)(Java Doc)
public int getSourceMaxProgressivePass()(Code)(Java Doc)
public int getSourceMinProgressivePass()(Code)(Java Doc)
public int getSourceNumProgressivePasses()(Code)(Java Doc)
public Dimension getSourceRenderSize()(Code)(Java Doc)
public void setDestination(BufferedImage destination)(Code)(Java Doc)
public void setDestinationBands(int[] destinationBands)(Code)(Java Doc)
public void setDestinationType(ImageTypeSpecifier destinationType)(Code)(Java Doc)
public void setSourceProgressivePasses(int minPass, int numPasses)(Code)(Java Doc)
public void setSourceRenderSize(Dimension size) throws UnsupportedOperationException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.