Java Doc for JPEGTileCodecDescriptor.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » javax » media » jai » tilecodec » Java Source Code / Java DocumentationJava Source Code and Java Documentation

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 geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » Java Advanced Imaging » javax.media.jai.tilecodec 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.media.jai.tilecodec.TileCodecDescriptorImpl
      javax.media.jai.tilecodec.JPEGTileCodecDescriptor

JPEGTileCodecDescriptor
public class JPEGTileCodecDescriptor extends TileCodecDescriptorImpl (Code)
This class is the descriptor for the "JPEG" tile codec. "jpeg" is a lossy tile codec, which involves compressing the tile data using the jpeg standard. The format name for the jpeg tile codec is "jpeg". The encoded stream contains the SampleModel and the tile's upper left corner position, thus the includesSampleModelInfo() and includesLocationInfo() methods in this descriptor return true.

This JPEG tile codec works well only on byte type images with 1, 3 or 4 bands.

While both the "tileDecoder" and "tileEncoder" registry modes for the "jpeg" tile codec scheme have the same set of parameters, the parameters for the "tileDecoder" mode are read-only and will be ignored if values are set for them in the TileCodecParameterList passed to the TileDecoder. The reason for this is that the parameter values needed to control the decoding process are included in the encoded stream, therefore parameter values specified externally are ignored. Once the decoding is completed, the parameter values in the TileCodecParameterList are updated to reflect the values specified in the encoded stream.

Resource List
Name Value
Vendor com.sun.media.jai
Description A descriptor to describe the lossy "jpeg" codec scheme.
DocURL http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/tilecodec/JPEGTileCodecDescriptor.html
Version 1.2
quality

A factor that relates to the desired tradeoff between image quality and the image data compression ratio. The range of this parameter is from 0.0 to 1.0. A setting of 1.0 produces the highest quality image at a lower compression rate. A setting of 0.0 produces the highest compression ratio, with a sacrifice to image quality. The default value is 0.75.

In JPEG, compression, there are two ways to control the quantization quality: one is define quantization table for each image component; the other is define the quality. The later overrides the former. If neither the quality nor quantization tables are set, the default setting is used.

When the quality is set, a group of quantization tables are generated by rescaling the default quantization tables. For more infomation, please refer to the links below.

qualitySet A boolean used to indicate that the parameter quality is set or not.
horizontalSubsampling The subsampling rate in the horizontal direction applied to each image component to reduce their resolution prior to encoding.
verticalSubsampling The subsampling rate in the vertical direction applied to each image component to reduce their resolution prior to encoding.
quantizationTableMapping In JPEG compression, several image components may share one quantization table. This is the mapping between the image component and the quantization tables.
quantizationTable0 A quantization table for JPEG codec is an array of 64 (8x8) expressed in zig-zag order (see the JPEG spec section K.1). Since this descriptor defines a JPEG scheme where the tile has at most 4 components, so at most 4 quantization tables will be used. This parameter is the first quantization table.
quantizationTable1 The second quantization table.
quantizationTable2 The third quantization table.
quantizationTable3 The fourth quantization table.
restartInterval JPEG images use restart markers to define multiple strips or tiles. The restart markers are inserted periodically into the image data to delineate image segments known as restart intervals. To limit the effect of bitstream errors to a single restart interval, JAI provides methods to set the restart interval in JPEG Minimum Coded Units (MCUs). The default is zero (no restart interval markers).
writeImageInfo A boolean instructs the encoder to write the image data to the output stream.
writeTableInfo A boolean instructs the encoder to write the table data to the output stream.
writeJFIFHeader The JPEG File Interchange Format (JFIF) is a minimal file format that enables JPEG bitstreams to be exchanged between a wide variety of platforms and applications. The parameter instructs the encoder to write the output stream in the JFIF format.

Parameter List
Name Class Type Default Value
quality java.lang.Float 0.75
qualitySet java.lang.Boolean true
horizontalSubsampling integer array {1,1,1}
verticalSubsampling integer array {1,1,1}
quantizationTableMapping integer array {0,1,1}
quantizationTable0 integer array The default Luminance table as defined in section K.1 of the JPEG specification.
quantizationTable1 integer array The default Chrominance table as defined in section K.1 of the JPEG specification.
quantizationTable2 integer array The default Chrominance table as defined in section K.1 of the JPEG specification.
quantizationTable3 integer array The default Chrominance table as defined in section K.1 of the JPEG specification.
restartInterval java.lang.Integer 0
writeImageInfo java.lang.Boolean true
writeTableInfo java.lang.Boolean true
writeJFIFHeader java.lang.Boolean false


See Also:   com.sun.image.codec.jpeg.JPEGQTable
See Also:   com.sun.image.codec.jpeg.JPEGDecodeParam
See Also:   com.sun.image.codec.jpeg.JPEGEncodeParam
since:
   JAI 1.1



Constructor Summary
public  JPEGTileCodecDescriptor()
    

Method Summary
public  TileCodecParameterListgetCompatibleParameters(String modeName, TileCodecParameterList otherParamList)
     Returns a TileCodecParameterList valid for the specified modeName and compatible with the supplied TileCodecParameterList.
public  TileCodecParameterListgetDefaultParameters(String modeName)
     Returns the default parameters for the specified modeName as an instance of the TileCodecParameterList.
public  TileCodecParameterListgetDefaultParameters(String modeName, SampleModel sm)
     Returns the default parameters for the specified modeName as an instance of the TileCodecParameterList, adding a "sampleModel" parameter with the specified value to the parameter list.
public  ParameterListDescriptorgetParameterListDescriptor(String modeName)
     Returns the ParameterListDescriptor that describes the associated parameters (NOT sources).


Constructor Detail
JPEGTileCodecDescriptor
public JPEGTileCodecDescriptor()(Code)
Creates a JPEGTileCodecDescriptor




Method Detail
getCompatibleParameters
public TileCodecParameterList getCompatibleParameters(String modeName, TileCodecParameterList otherParamList)(Code)
Returns a TileCodecParameterList valid for the specified modeName and compatible with the supplied TileCodecParameterList. For example, given a TileCodecParameterList used to encode a tile with the modeName being specified as "tileDecoder", this method will return a TileCodecParameterList sufficient to decode that same tile.

If the supplied modeName is one of the valid mode names as ascertained from the getSupportedNames() method, this method returns a TileCodecParameterList that contains values that are compatible for the supplied mode name.
Parameters:
  modeName - The registry mode to return a valid parameter list for.
Parameters:
  otherParamList - The parameter list for which a compatible parameter list for the complementary modeName isto be found.
throws:
  IllegalArgumentException - if modeName is null.
throws:
  IllegalArgumentException - if modeName is notone of the modes valid for this descriptor, i.e those returnedfrom the getSupportedNames() method.
throws:
  IllegalArgumentException - if otherParamList is null.




getDefaultParameters
public TileCodecParameterList getDefaultParameters(String modeName)(Code)
Returns the default parameters for the specified modeName as an instance of the TileCodecParameterList. If the supplied modeName is one of the valid mode names as ascertained from the getSupportedNames() method, this method returns the default parameters for that mode.
Parameters:
  modeName - The mode to return the default parameters for.
throws:
  IllegalArgumentException - if modeName is null.
throws:
  IllegalArgumentException - if modeName is notone of the modes valid for this descriptor, i.e those returnedfrom the getSupportedNames() method.



getDefaultParameters
public TileCodecParameterList getDefaultParameters(String modeName, SampleModel sm)(Code)
Returns the default parameters for the specified modeName as an instance of the TileCodecParameterList, adding a "sampleModel" parameter with the specified value to the parameter list. If the supplied modeName is one of the valid mode names as ascertained from the getSupportedNames() method, this method returns the default parameters for that mode.

This method should be used when includesSampleModelInfo() returns false. If includesSampleModelInfo() returns true, the supplied SampleModel is ignored.

For the JPEG codec, includesSampleModelInfo() returns true, so the supplied SampleModel is ignored.
Parameters:
  modeName - The mode to return the default parameters for.
Parameters:
  sm - The SampleModel used to create the default decoding parameter list.
throws:
  IllegalArgumentException - if modeName is null.
throws:
  IllegalArgumentException - if modeName is notone of the modes valid for this descriptor, i.e those returnedfrom the getSupportedNames() method.




getParameterListDescriptor
public ParameterListDescriptor getParameterListDescriptor(String modeName)(Code)
Returns the ParameterListDescriptor that describes the associated parameters (NOT sources). If the supplied modeName is one of the valid mode names as ascertained from the getSupportedNames() method, this method returns a non-null ParameterListDescriptor with the appropriate parameters.
Parameters:
  modeName - The mode to return the ParameterListDescriptor for.
throws:
  IllegalArgumentException - if modeName is null.
throws:
  IllegalArgumentException - if modeName is notone of the modes valid for this descriptor, i.e those returnedfrom the getSupportedNames() method.



Methods inherited from javax.media.jai.tilecodec.TileCodecDescriptorImpl
public boolean arePropertiesSupported()(Code)(Java Doc)
public String getName()(Code)(Java Doc)
public PropertyGenerator[] getPropertyGenerators(String modeName)(Code)(Java Doc)
public String[] getSupportedModes()(Code)(Java Doc)
public boolean includesLocationInfo()(Code)(Java Doc)
public boolean includesSampleModelInfo()(Code)(Java Doc)
public boolean isModeSupported(String registryModeName)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.