Java Doc for TIFFEncodeParam.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » com » sun » media » jai » codec » 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 » com.sun.media.jai.codec 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.media.jai.codec.TIFFEncodeParam

TIFFEncodeParam
public class TIFFEncodeParam implements ImageEncodeParam(Code)
An instance of ImageEncodeParam for encoding images in the TIFF format.

This class allows for the specification of encoding parameters. By default, the image is encoded without any compression, and is written out consisting of strips, not tiles. The particular compression scheme to be used can be specified by using the setCompression() method. The compression scheme specified will be honored only if it is compatible with the type of image being written out. For example, Group3 and Group4 compressions can only be used with Bilevel images. Writing of tiled TIFF images can be enabled by calling the setWriteTiled() method.

This class is not a committed part of the JAI API. It may be removed or changed in future releases of JAI.



Field Summary
final public static  intCOMPRESSION_DEFLATE
     DEFLATE lossless compression (also known as "Zip-in-TIFF").
final public static  intCOMPRESSION_GROUP3_1D
     Modified Huffman Compression (CCITT Run Length Encoding (RLE)).
final public static  intCOMPRESSION_GROUP3_2D
     CCITT T.4 bilevel compression (Group 3 facsimile compression).
final public static  intCOMPRESSION_GROUP4
     CCITT T.6 bilevel compression (Group 4 facsimile compression).
final public static  intCOMPRESSION_JPEG_TTN2
     JPEG-in-TIFF compression.
final public static  intCOMPRESSION_LZW
     LZW compression.
final public static  intCOMPRESSION_NONE
     No compression.
final public static  intCOMPRESSION_PACKBITS
     Byte-oriented run-length encoding "PackBits" compression.

Constructor Summary
public  TIFFEncodeParam()
     Constructs a TIFFEncodeParam object with default values for all parameters.

Method Summary
public  intgetCompression()
     Returns the value of the compression parameter.
public  intgetDeflateLevel()
     Gets the compression level for DEFLATE compression.
public  TIFFField[]getExtraFields()
     Returns the value set by setExtraFields().
public synchronized  IteratorgetExtraImages()
     Returns the additional image Iterator specified via setExtraImages() or null if none was supplied or if a null value was supplied.
public  booleangetJPEGCompressRGBToYCbCr()
     Whether RGB data will be converted to YCbCr when using JPEG compression.
public  JPEGEncodeParamgetJPEGEncodeParam()
     Retrieves the JPEG compression parameters.
public  booleangetLittleEndian()
     Returns the value of the flag indicating whether the output stream byte order is little endian.
public  booleangetReverseFillOrder()
     Returns value of flag indicating whether CCITT-compressed bilevel data should be filled in reverse order.
public  booleangetT4Encode2D()
     Returns value of flag indicating whether T4-compressed bilevel data should be two-dimensionally encoded.
public  booleangetT4PadEOLs()
     Returns value of flag indicating whether T4-compressed bilevel data should have the embedded EOL bit sequences padded to byte alignment.
public  intgetTileHeight()
     Retrieves the tile height set via setTileSize().
public  intgetTileWidth()
     Retrieves the tile width set via setTileSize().
public  booleangetWriteTiled()
     Returns the value of the writeTiled parameter.
public  voidsetCompression(int compression)
     Specifies the type of compression to be used.
public  voidsetDeflateLevel(int deflateLevel)
     Sets the compression level for DEFLATE-compressed data which should either be java.util.Deflater.DEFAULT_COMPRESSION or a value in the range [1,9] where larger values indicate more compression. The default setting is Deflater.DEFAULT_COMPRESSION.
public  voidsetExtraFields(TIFFField[] extraFields)
     Sets an array of extra fields to be written to the TIFF Image File Directory (IFD).
public synchronized  voidsetExtraImages(Iterator extraImages)
     Sets an Iterator of additional images to be written after the image passed as an argument to the ImageEncoder. The methods on the supplied Iterator must only be invoked by the ImageEncoder which will exhaust the available values unless an error occurs.

The value returned by an invocation of next() on the Iterator must return either a RenderedImage or an Object[] of length 2 wherein the element at index zero is a RenderedImage amd the other element is a TIFFEncodeParam.

public  voidsetJPEGCompressRGBToYCbCr(boolean convertJPEGRGBToYCbCr)
     Sets flag indicating whether to convert RGB data to YCbCr when the compression type is JPEG.
public  voidsetJPEGEncodeParam(JPEGEncodeParam jpegEncodeParam)
     Sets the JPEG compression parameters.
public  voidsetLittleEndian(boolean isLittleEndian)
     Sets a flag indicating whether the byte order used to write the output stream is little endian.
public  voidsetReverseFillOrder(boolean reverseFillOrder)
     Set value of flag indicating whether CCITT-compressed bilevel data should be filled in reverse order.
public  voidsetT4Encode2D(boolean T4Encode2D)
     Set value of flag indicating whether T4-compressed bilevel data should be two-dimensionally encoded.
public  voidsetT4PadEOLs(boolean T4PadEOLs)
     Sets value of flag indicating whether T4-compressed bilevel data should have the embedded EOL bit sequences padded to byte alignment. If true, zero-valued bits are prepended to each EOL bit sequence 0x001 such that the EOL is right-aligned on a byte boundary:
 xxxx-0000 0000-0001
 
where "x" denotes a value which could be either data or a fill bit depending on the alignment of the data before the EOL.
public  voidsetTileSize(int tileWidth, int tileHeight)
     Sets the dimensions of the tiles to be written.
public  voidsetWriteTiled(boolean writeTiled)
     If set, the data will be written out in tiled format, instead of in strips.

Field Detail
COMPRESSION_DEFLATE
final public static int COMPRESSION_DEFLATE(Code)
DEFLATE lossless compression (also known as "Zip-in-TIFF").



COMPRESSION_GROUP3_1D
final public static int COMPRESSION_GROUP3_1D(Code)
Modified Huffman Compression (CCITT Run Length Encoding (RLE)).



COMPRESSION_GROUP3_2D
final public static int COMPRESSION_GROUP3_2D(Code)
CCITT T.4 bilevel compression (Group 3 facsimile compression).



COMPRESSION_GROUP4
final public static int COMPRESSION_GROUP4(Code)
CCITT T.6 bilevel compression (Group 4 facsimile compression).



COMPRESSION_JPEG_TTN2
final public static int COMPRESSION_JPEG_TTN2(Code)
JPEG-in-TIFF compression.



COMPRESSION_LZW
final public static int COMPRESSION_LZW(Code)
LZW compression.

Not supported.




COMPRESSION_NONE
final public static int COMPRESSION_NONE(Code)
No compression.



COMPRESSION_PACKBITS
final public static int COMPRESSION_PACKBITS(Code)
Byte-oriented run-length encoding "PackBits" compression.




Constructor Detail
TIFFEncodeParam
public TIFFEncodeParam()(Code)
Constructs a TIFFEncodeParam object with default values for all parameters.




Method Detail
getCompression
public int getCompression()(Code)
Returns the value of the compression parameter.



getDeflateLevel
public int getDeflateLevel()(Code)
Gets the compression level for DEFLATE compression.



getExtraFields
public TIFFField[] getExtraFields()(Code)
Returns the value set by setExtraFields().



getExtraImages
public synchronized Iterator getExtraImages()(Code)
Returns the additional image Iterator specified via setExtraImages() or null if none was supplied or if a null value was supplied.



getJPEGCompressRGBToYCbCr
public boolean getJPEGCompressRGBToYCbCr()(Code)
Whether RGB data will be converted to YCbCr when using JPEG compression.



getJPEGEncodeParam
public JPEGEncodeParam getJPEGEncodeParam()(Code)
Retrieves the JPEG compression parameters.



getLittleEndian
public boolean getLittleEndian()(Code)
Returns the value of the flag indicating whether the output stream byte order is little endian.



getReverseFillOrder
public boolean getReverseFillOrder()(Code)
Returns value of flag indicating whether CCITT-compressed bilevel data should be filled in reverse order.
See Also:   TIFFEncodeParam.setReverseFillOrder



getT4Encode2D
public boolean getT4Encode2D()(Code)
Returns value of flag indicating whether T4-compressed bilevel data should be two-dimensionally encoded.
See Also:   TIFFEncodeParam.setT4Encode2D



getT4PadEOLs
public boolean getT4PadEOLs()(Code)
Returns value of flag indicating whether T4-compressed bilevel data should have the embedded EOL bit sequences padded to byte alignment.
See Also:   TIFFEncodeParam.setT4PadEOLs



getTileHeight
public int getTileHeight()(Code)
Retrieves the tile height set via setTileSize().



getTileWidth
public int getTileWidth()(Code)
Retrieves the tile width set via setTileSize().



getWriteTiled
public boolean getWriteTiled()(Code)
Returns the value of the writeTiled parameter.



setCompression
public void setCompression(int compression)(Code)
Specifies the type of compression to be used. The compression type specified will be honored only if it is compatible with the image being written out. Currently only PackBits, JPEG, and DEFLATE compression schemes are supported.

If compression is set to any value but COMPRESSION_NONE and the OutputStream supplied to the ImageEncoder is not a SeekableOutputStream, then the encoder will use either a temporary file or a memory cache when compressing the data depending on whether the file system is accessible. Compression will therefore be more efficient if a SeekableOutputStream is supplied.
Parameters:
  compression - The compression type.
throws:
  IllegalArgumentException - if compression isnot one of the defined COMPRESSION_* constants.




setDeflateLevel
public void setDeflateLevel(int deflateLevel)(Code)
Sets the compression level for DEFLATE-compressed data which should either be java.util.Deflater.DEFAULT_COMPRESSION or a value in the range [1,9] where larger values indicate more compression. The default setting is Deflater.DEFAULT_COMPRESSION. This setting is ignored if the compression type is not DEFLATE.
throws:
  IllegalArgumentException - if deflateLevel isnot in the range [1, 9] and is notDeflater.DEFAULT_COMPRESSION.



setExtraFields
public void setExtraFields(TIFFField[] extraFields)(Code)
Sets an array of extra fields to be written to the TIFF Image File Directory (IFD). Fields with tags equal to the tag of any automatically generated fields are ignored. No error checking is performed with respect to the validity of the field contents or the appropriateness of the field for the image being encoded.
Parameters:
  extraFields - An array of extra fields; the parameter iscopied by reference.



setExtraImages
public synchronized void setExtraImages(Iterator extraImages)(Code)
Sets an Iterator of additional images to be written after the image passed as an argument to the ImageEncoder. The methods on the supplied Iterator must only be invoked by the ImageEncoder which will exhaust the available values unless an error occurs.

The value returned by an invocation of next() on the Iterator must return either a RenderedImage or an Object[] of length 2 wherein the element at index zero is a RenderedImage amd the other element is a TIFFEncodeParam. If no TIFFEncodeParam is supplied in this manner for an additional image, the parameters used to create the ImageEncoder will be used. The extra image Iterator set on any TIFFEncodeParam of an additional image will in all cases be ignored.




setJPEGCompressRGBToYCbCr
public void setJPEGCompressRGBToYCbCr(boolean convertJPEGRGBToYCbCr)(Code)
Sets flag indicating whether to convert RGB data to YCbCr when the compression type is JPEG. The default value is true. This flag is ignored if the compression type is not JPEG.



setJPEGEncodeParam
public void setJPEGEncodeParam(JPEGEncodeParam jpegEncodeParam)(Code)
Sets the JPEG compression parameters. These parameters are ignored if the compression type is not JPEG. The argument may be null to indicate that default compression parameters are to be used. For maximum conformance with the specification it is recommended in most cases that only the quality compression parameter be set.

The writeTablesOnly and JFIFHeader flags of the JPEGEncodeParam are ignored. The writeImageOnly flag is used to determine whether the JPEGTables field will be written to the TIFF stream: if writeImageOnly is true, then the JPEGTables field will be written and will contain a valid JPEG abbreviated table specification datastream. In this case the data in each data segment (strip or tile) will contain an abbreviated JPEG image datastream. If the writeImageOnly flag is false, then the JPEGTables field will not be written and each data segment will contain a complete JPEG interchange datastream.




setLittleEndian
public void setLittleEndian(boolean isLittleEndian)(Code)
Sets a flag indicating whether the byte order used to write the output stream is little endian. If true multi-byte data units such as 16-bit and 32-bit integers and 32-bit floating point values are written from the least to the most significant byte; if false the order is from most to least significant byte. The default value is false.



setReverseFillOrder
public void setReverseFillOrder(boolean reverseFillOrder)(Code)
Set value of flag indicating whether CCITT-compressed bilevel data should be filled in reverse order. If true, pixels are arranged within a byte such that pixels with lower column values are stored in the lower order bits of the byte. Thus true corresponds to TIFF FillOrder value 2 and false to TIFF FillOrder 1. The default value is false.



setT4Encode2D
public void setT4Encode2D(boolean T4Encode2D)(Code)
Set value of flag indicating whether T4-compressed bilevel data should be two-dimensionally encoded. If true the data are two-dimensionally encoded; if false they are one-dimensionally encoded. The default value is true.



setT4PadEOLs
public void setT4PadEOLs(boolean T4PadEOLs)(Code)
Sets value of flag indicating whether T4-compressed bilevel data should have the embedded EOL bit sequences padded to byte alignment. If true, zero-valued bits are prepended to each EOL bit sequence 0x001 such that the EOL is right-aligned on a byte boundary:
 xxxx-0000 0000-0001
 
where "x" denotes a value which could be either data or a fill bit depending on the alignment of the data before the EOL. The default value is false.



setTileSize
public void setTileSize(int tileWidth, int tileHeight)(Code)
Sets the dimensions of the tiles to be written. If either value is non-positive, the encoder will use a default value.

If the data are being written as tiles, i.e., getWriteTiled() returns true, then the default tile dimensions used by the encoder are those of the tiles of the image being encoded.

If the data are being written as strips, i.e., getWriteTiled() returns false, the width of each strip is always the width of the image and the default number of rows per strip is 8.

If JPEG compession is being used, the dimensions of the strips or tiles may be modified to conform to the JPEG-in-TIFF specification.
Parameters:
  tileWidth - The tile width; ignored if strips are used.
Parameters:
  tileHeight - The tile height or number of rows per strip.




setWriteTiled
public void setWriteTiled(boolean writeTiled)(Code)
If set, the data will be written out in tiled format, instead of in strips.
Parameters:
  writeTiled - Specifies whether the image data should be wriiten out in tiled format.



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.