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


javax.imageio.ImageWriteParam
   com.sun.media.imageio.plugins.tiff.TIFFImageWriteParam

TIFFImageWriteParam
public class TIFFImageWriteParam extends ImageWriteParam (Code)
A subclass of ImageWriteParam ImageWriteParam allowing control over the TIFF writing process. The set of innately supported compression types is listed in the following table:

Supported Compression Types
Compression Type Description Reference
CCITT RLE Modified Huffman compression TIFF 6.0 Specification, Section 10
CCITT T.4 CCITT T.4 bilevel encoding/Group 3 facsimile compression TIFF 6.0 Specification, Section 11
CCITT T.6 CCITT T.6 bilevel encoding/Group 4 facsimile compression TIFF 6.0 Specification, Section 11
LZW LZW compression TIFF 6.0 Specification, Section 13
JPEG "New" JPEG-in-TIFF compression TIFF Technical Note #2
ZLib "Deflate/Inflate" compression (see note following this table) Adobe Photoshop® TIFF Technical Notes (PDF)
PackBits Byte-oriented, run length compression TIFF 6.0 Specification, Section 9
Deflate "Zip-in-TIFF" compression (see note following this table) ZLIB Compressed Data Format Specification, DEFLATE Compressed Data Format Specification
EXIF JPEG EXIF-specific JPEG compression (see note following this table) EXIF 2.2 Specification (PDF), section 4.5.5, "Basic Structure of Thumbnail Data"

Old-style JPEG compression as described in section 22 of the TIFF 6.0 Specification is not supported.

The CCITT compression types are applicable to bilevel (1-bit) images only. The JPEG compression type is applicable to byte grayscale (1-band) and RGB (3-band) images only.

ZLib and Deflate compression are identical except for the value of the TIFF Compression field: for ZLib the Compression field has value 8 whereas for Deflate it has value 32946 (0x80b2). In both cases each image segment (strip or tile) is written as a single complete zlib data stream.

"EXIF JPEG" is a compression type used when writing the contents of an APP1 EXIF marker segment for inclusion in a JPEG native image metadata tree. The contents appended to the output when this compression type is used are a function of whether an empty or non-empty image is written. If the image is empty, then a TIFF IFD adhering to the specification of a compressed EXIF primary IFD is appended. If the image is non-empty, then a complete IFD and image adhering to the specification of a compressed EXIF thumbnail IFD and image are appended. Note that the data of the empty image may not later be appended using the pixel replacement capability of the TIFF writer.

If ZLib/Deflate or JPEG compression is used, the compression quality may be set. For ZLib/Deflate the supplied floating point quality value is rescaled to the range [1, 9] and truncated to an integer to derive the Deflate compression level. For JPEG the floating point quality value is passed directly to the JPEG writer plug-in which interprets it in the usual way.

The canWriteTiles and canWriteCompressed methods will return true; the canOffsetTiles and canWriteProgressive methods will return false.

If tiles are being written, then each of their dimensions will be rounded to the nearest multiple of 16 per the TIFF specification. If JPEG-in-TIFF compression is being used, and tiles are being written each tile dimension will be rounded to the nearest multiple of 8 times the JPEG minimum coded unit (MCU) in that dimension. If JPEG-in-TIFF compression is being used and strips are being written, the number of rows per strip is rounded to a multiple of 8 times the maximum MCU over both dimensions.



Field Summary
 TIFFColorConvertercolorConverter
    
 TIFFCompressorcompressor
    
 intphotometricInterpretation
    

Constructor Summary
public  TIFFImageWriteParam(Locale locale)
     Constructs a TIFFImageWriteParam instance for a given Locale.

Method Summary
public  TIFFColorConvertergetColorConverter()
     Returns the current TIFFColorConverter object that will be used to perform color conversion when writing the image, or null if none is set.
public  intgetPhotometricInterpretation()
     Returns the current value that will be written to the Photometricinterpretation tag.
public  TIFFCompressorgetTIFFCompressor()
     Returns the TIFFCompressor that is currently set to be used by the ImageWriter to encode each image strip or tile, or null if none has been set.
public  booleanisCompressionLossless()
    
public  voidsetColorConverter(TIFFColorConverter colorConverter, int photometricInterpretation)
     Sets the TIFFColorConverter object describing the color space to which the input data should be converted for storage in the input stream.
public  voidsetTIFFCompressor(TIFFCompressor compressor)
     Sets the TIFFCompressor object to be used by the ImageWriter to encode each image strip or tile. A value of null allows the writer to choose its own TIFFCompressor.

Note that invoking this method is not sufficient to set the compression type: ImageWriteParam.setCompressionType(String) setCompressionType() must be invoked explicitly for this purpose.

public  voidunsetColorConverter()
     Removes any currently set ColorConverter object and PhotometricInterpretation tag value.

Field Detail
colorConverter
TIFFColorConverter colorConverter(Code)



compressor
TIFFCompressor compressor(Code)



photometricInterpretation
int photometricInterpretation(Code)




Constructor Detail
TIFFImageWriteParam
public TIFFImageWriteParam(Locale locale)(Code)
Constructs a TIFFImageWriteParam instance for a given Locale.
Parameters:
  locale - the Locale for which messagesshould be localized.




Method Detail
getColorConverter
public TIFFColorConverter getColorConverter()(Code)
Returns the current TIFFColorConverter object that will be used to perform color conversion when writing the image, or null if none is set. a TIFFColorConverter object, ornull.
See Also:   TIFFImageWriteParam.setColorConverter(TIFFColorConverter,int)



getPhotometricInterpretation
public int getPhotometricInterpretation()(Code)
Returns the current value that will be written to the Photometricinterpretation tag. This method should only be called if a value has been set using the setColorConverter method. an int to be used as the value of thePhotometricInterpretation tag.
See Also:   TIFFImageWriteParam.setColorConverter(TIFFColorConverter,int)
throws:
  IllegalStateException - if no value is set.



getTIFFCompressor
public TIFFCompressor getTIFFCompressor()(Code)
Returns the TIFFCompressor that is currently set to be used by the ImageWriter to encode each image strip or tile, or null if none has been set. compressor the TIFFCompressor to beused for encoding, or null if none has been set(allowing the writer to choose its own).
throws:
  IllegalStateException - if the compression mode is notMODE_EXPLICIT.
See Also:   TIFFImageWriteParam.setTIFFCompressor(TIFFCompressor)



isCompressionLossless
public boolean isCompressionLossless()(Code)



setColorConverter
public void setColorConverter(TIFFColorConverter colorConverter, int photometricInterpretation)(Code)
Sets the TIFFColorConverter object describing the color space to which the input data should be converted for storage in the input stream. In addition, the value to be written to the PhotometricInterpretation tag is supplied.
Parameters:
  colorConverter - a TIFFColorConverter object,or null.
Parameters:
  photometricInterpretation - the value to be written to thePhotometricInterpretation tag in the root IFD.
See Also:   TIFFImageWriteParam.getColorConverter
See Also:   TIFFImageWriteParam.getPhotometricInterpretation



setTIFFCompressor
public void setTIFFCompressor(TIFFCompressor compressor)(Code)
Sets the TIFFCompressor object to be used by the ImageWriter to encode each image strip or tile. A value of null allows the writer to choose its own TIFFCompressor.

Note that invoking this method is not sufficient to set the compression type: ImageWriteParam.setCompressionType(String) setCompressionType() must be invoked explicitly for this purpose. The following code illustrates the correct procedure:

 TIFFImageWriteParam writeParam;
 TIFFCompressor compressor;
 writeParam.setCompressionMode(writeParam.MODE_EXPLICIT);
 writeParam.setTIFFCompressor(compressor);
 writeParam.setCompressionType(compressor.getCompressionType());
 
If compressionType is set to a value different from that supported by the TIFFCompressor then the compressor object will not be used.

If the compression type supported by the supplied TIFFCompressor is not among those in ImageWriteParam.compressionTypes compressionTypes , then it will be appended to this array after removing any previously appended compression type. If compressor is null this will also cause any previously appended type to be removed from the array.


Parameters:
  compressor - the TIFFCompressor to beused for encoding, or null to allow the writer tochoose its own.
throws:
  IllegalStateException - if the compression mode is notMODE_EXPLICIT.
See Also:   TIFFImageWriteParam.getTIFFCompressor



unsetColorConverter
public void unsetColorConverter()(Code)
Removes any currently set ColorConverter object and PhotometricInterpretation tag value.
See Also:   TIFFImageWriteParam.setColorConverter(TIFFColorConverter,int)



Fields inherited from javax.imageio.ImageWriteParam
final public static int MODE_COPY_FROM_METADATA(Code)(Java Doc)
final public static int MODE_DEFAULT(Code)(Java Doc)
final public static int MODE_DISABLED(Code)(Java Doc)
final public static int MODE_EXPLICIT(Code)(Java Doc)
protected boolean canOffsetTiles(Code)(Java Doc)
protected boolean canWriteCompressed(Code)(Java Doc)
protected boolean canWriteProgressive(Code)(Java Doc)
protected boolean canWriteTiles(Code)(Java Doc)
protected int compressionMode(Code)(Java Doc)
protected float compressionQuality(Code)(Java Doc)
protected String compressionType(Code)(Java Doc)
protected String[] compressionTypes(Code)(Java Doc)
protected Locale locale(Code)(Java Doc)
protected Dimension[] preferredTileSizes(Code)(Java Doc)
protected int progressiveMode(Code)(Java Doc)
protected int tileGridXOffset(Code)(Java Doc)
protected int tileGridYOffset(Code)(Java Doc)
protected int tileHeight(Code)(Java Doc)
protected int tileWidth(Code)(Java Doc)
protected int tilingMode(Code)(Java Doc)
protected boolean tilingSet(Code)(Java Doc)

Methods inherited from javax.imageio.ImageWriteParam
public boolean canOffsetTiles()(Code)(Java Doc)
public boolean canWriteCompressed()(Code)(Java Doc)
public boolean canWriteProgressive()(Code)(Java Doc)
public boolean canWriteTiles()(Code)(Java Doc)
public float getBitRate(float quality)(Code)(Java Doc)
public int getCompressionMode()(Code)(Java Doc)
public float getCompressionQuality()(Code)(Java Doc)
public String[] getCompressionQualityDescriptions()(Code)(Java Doc)
public float[] getCompressionQualityValues()(Code)(Java Doc)
public String getCompressionType()(Code)(Java Doc)
public String[] getCompressionTypes()(Code)(Java Doc)
public Locale getLocale()(Code)(Java Doc)
public String getLocalizedCompressionTypeName()(Code)(Java Doc)
public Dimension[] getPreferredTileSizes()(Code)(Java Doc)
public int getProgressiveMode()(Code)(Java Doc)
public int getTileGridXOffset()(Code)(Java Doc)
public int getTileGridYOffset()(Code)(Java Doc)
public int getTileHeight()(Code)(Java Doc)
public int getTileWidth()(Code)(Java Doc)
public int getTilingMode()(Code)(Java Doc)
public boolean isCompressionLossless()(Code)(Java Doc)
public void setCompressionMode(int mode)(Code)(Java Doc)
public void setCompressionQuality(float quality)(Code)(Java Doc)
public void setCompressionType(String compressionType)(Code)(Java Doc)
public void setProgressiveMode(int mode)(Code)(Java Doc)
public void setTiling(int tileWidth, int tileHeight, int tileGridXOffset, int tileGridYOffset)(Code)(Java Doc)
public void setTilingMode(int mode)(Code)(Java Doc)
public void unsetCompression()(Code)(Java Doc)
public void unsetTiling()(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.