Java Doc for PNGEncodeParam.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.PNGEncodeParam

PNGEncodeParam
abstract public class PNGEncodeParam implements ImageEncodeParam(Code)
An instance of ImageEncodeParam for encoding images in the PNG format.

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


Inner Class :public static class Palette extends PNGEncodeParam
Inner Class :public static class Gray extends PNGEncodeParam
Inner Class :public static class RGB extends PNGEncodeParam

Field Summary
final public static  intINTENT_ABSOLUTE
     Constant for use with the sRGB chunk.
final public static  intINTENT_PERCEPTUAL
     Constant for use with the sRGB chunk.
final public static  intINTENT_RELATIVE
     Constant for use with the sRGB chunk.
final public static  intINTENT_SATURATION
     Constant for use with the sRGB chunk.
final public static  intPNG_FILTER_AVERAGE
     Constant for use in filtering.
final public static  intPNG_FILTER_NONE
     Constant for use in filtering.
final public static  intPNG_FILTER_PAETH
     Constant for use in filtering.
final public static  intPNG_FILTER_SUB
     Constant for use in filtering.
final public static  intPNG_FILTER_UP
     Constant for use in filtering.
protected  intbitDepth
    
protected  booleanbitDepthSet
    
 VectorchunkData
    
 VectorchunkType
    
 booleantransparencySet
    


Method Summary
public synchronized  voidaddPrivateChunk(String type, byte[] data)
     Adds a private chunk, in binary form, to the list of chunks to be stored with this image.
public  intfilterRow(byte[] currRow, byte[] prevRow, byte[][] scratchRows, int bytesPerRow, int bytesPerPixel)
     Performs filtering on a row of an image.
public  intgetBitDepth()
     Returns the desired bit depth for a grayscale image.
public  float[]getChromaticity()
     Returns the white point and primary chromaticities in CIE (x, y) space.
public  String[]getCompressedText()
     Returns the text strings to be stored in compressed form with this image as an array of Strings.
public static  PNGEncodeParamgetDefaultEncodeParam(RenderedImage im)
     Returns an instance of PNGEncodeParam.Palette, PNGEncodeParam.Gray, or PNGEncodeParam.RGB appropriate for encoding the given image.

If the image has an IndexColorModel, an instance of PNGEncodeParam.Palette is returned. Otherwise, if the image has 1 or 2 bands an instance of PNGEncodeParam.Gray is returned.

public  floatgetGamma()
     Returns the file gamma value for the image.
public  byte[]getICCProfileData()
     Returns the ICC profile data to be stored with this image.
public  StringgetICCProfileName()
     Returns the ICC profile name.
public  booleangetInterlacing()
     Returns true if Adam7 interlacing will be used.
public  DategetModificationTime()
     Returns the modification time to be stored with this image.
public synchronized  intgetNumPrivateChunks()
     Returns the number of private chunks to be written to the output file.
public  int[]getPaletteHistogram()
     Returns the palette histogram to be stored with this image.
public  int[]getPhysicalDimension()
     Returns the physical dimension information to be stored with this image.
public synchronized  byte[]getPrivateChunkData(int index)
     Returns the data associated of the private chunk at a given index, as an array of bytes.
public synchronized  StringgetPrivateChunkType(int index)
     Returns the type of the private chunk at a given index, as a 4-character String.
public  intgetSRGBIntent()
     Returns the sRGB rendering intent to be stored with this image.
public  int[]getSignificantBits()
     Returns the number of significant bits for each band of the image.
public  PNGSuggestedPaletteEntry[]getSuggestedPalette()
     Returns the suggested palette information to be stored with this image.
public  String[]getText()
     Returns the text strings to be stored in uncompressed form with this image as an array of Strings.
public  booleanisBackgroundSet()
     Returns true if a 'bKGD' chunk will be output.
public  booleanisChromaticitySet()
     Returns true if a 'cHRM' chunk will be output.
public  booleanisCompressedTextSet()
     Returns true if a 'zTXT' chunk will be output.
public  booleanisGammaSet()
     Returns true if a 'gAMA' chunk will be output.
public  booleanisICCProfileDataSet()
     Returns true if a 'iCCP' chunk will be output.
public  booleanisModificationTimeSet()
     Returns true if a 'tIME' chunk will be output.
public  booleanisPaletteHistogramSet()
     Returns true if a 'hIST' chunk will be output.
public  booleanisPhysicalDimensionSet()
     Returns true if a 'pHYS' chunk will be output.
public  booleanisSRGBIntentSet()
     Returns true if an 'sRGB' chunk will be output.
public  booleanisSignificantBitsSet()
     Returns true if an 'sBIT' chunk will be output.
public  booleanisSuggestedPaletteSet()
     Returns true if a 'sPLT' chunk will be output.
public  booleanisTextSet()
     Returns true if a 'tEXt' chunk will be output.
public  booleanisTransparencySet()
     Returns true if a 'tRNS' chunk will be output.
final public static  intpaethPredictor(int a, int b, int c)
     The Paeth predictor routine used in PNG encoding.
public synchronized  voidremoveAllPrivateChunks()
     Remove all private chunks associated with this parameter instance.
public synchronized  voidremoveUnsafeToCopyPrivateChunks()
     Remove all private chunks associated with this parameter instance whose 'safe-to-copy' bit is not set.
abstract public  voidsetBitDepth(int bitDepth)
     Sets the desired bit depth of an image.
public  voidsetChromaticity(float[] chromaticity)
     Sets the white point and primary chromaticities in CIE (x, y) space.
public  voidsetChromaticity(float whitePointX, float whitePointY, float redX, float redY, float greenX, float greenY, float blueX, float blueY)
     A convenience method that calls the array version.
public  voidsetCompressedText(String[] text)
     Sets the text strings to be stored in compressed form with this image.
public  voidsetGamma(float gamma)
     Sets the file gamma value for the image.
public  voidsetICCProfileData(byte[] ICCProfileData)
     Sets the ICC profile data to be stored with this image.
public  voidsetICCProfileName(String name)
     Sets the ICC profile name.
public  voidsetInterlacing(boolean useInterlacing)
     Turns Adam7 interlacing on or off.
public  voidsetModificationTime(Date modificationTime)
     Sets the modification time, as a Date, to be stored with this image.
public  voidsetPaletteHistogram(int[] paletteHistogram)
     Sets the palette histogram to be stored with this image.
public  voidsetPhysicalDimension(int[] physicalDimension)
     Sets the physical dimension information to be stored with this image.
public  voidsetPhysicalDimension(int xPixelsPerUnit, int yPixelsPerUnit, int unitSpecifier)
     A convenience method that calls the array version.
public  voidsetSRGBIntent(int SRGBIntent)
     Sets the sRGB rendering intent to be stored with this image. The legal values are 0 = Perceptual, 1 = Relative Colorimetric, 2 = Saturation, and 3 = Absolute Colorimetric.
public  voidsetSignificantBits(int[] significantBits)
     Sets the number of significant bits for each band of the image.
public  voidsetSuggestedPalette(PNGSuggestedPaletteEntry[] palette)
     Sets the suggested palette information to be stored with this image.
public  voidsetText(String[] text)
     Sets the textual data to be stored in uncompressed form with this image.
public  voidunsetBackground()
     Suppresses the 'bKGD' chunk from being output.
public  voidunsetBitDepth()
     Suppresses the setting of the bit depth of a grayscale image.
public  voidunsetChromaticity()
     Suppresses the 'cHRM' chunk from being output.
public  voidunsetCompressedText()
     Suppresses the 'zTXt' chunk from being output.
public  voidunsetGamma()
     Suppresses the 'gAMA' chunk from being output.
public  voidunsetICCProfileData()
     Suppresses the 'iCCP' chunk from being output.
public  voidunsetModificationTime()
     Suppresses the 'tIME' chunk from being output.
public  voidunsetPaletteHistogram()
     Suppresses the 'hIST' chunk from being output.
public  voidunsetPhysicalDimension()
     Suppresses the 'pHYS' chunk from being output.
public  voidunsetSRGBIntent()
     Suppresses the 'sRGB' chunk from being output.
public  voidunsetSignificantBits()
     Suppresses the 'sBIT' chunk from being output.
public  voidunsetSuggestedPalette()
     Suppresses the 'sPLT' chunk from being output.
public  voidunsetText()
     Suppresses the 'tEXt' chunk from being output.
public  voidunsetTransparency()
     Suppresses the 'tRNS' chunk from being output.

Field Detail
INTENT_ABSOLUTE
final public static int INTENT_ABSOLUTE(Code)
Constant for use with the sRGB chunk.



INTENT_PERCEPTUAL
final public static int INTENT_PERCEPTUAL(Code)
Constant for use with the sRGB chunk.



INTENT_RELATIVE
final public static int INTENT_RELATIVE(Code)
Constant for use with the sRGB chunk.



INTENT_SATURATION
final public static int INTENT_SATURATION(Code)
Constant for use with the sRGB chunk.



PNG_FILTER_AVERAGE
final public static int PNG_FILTER_AVERAGE(Code)
Constant for use in filtering.



PNG_FILTER_NONE
final public static int PNG_FILTER_NONE(Code)
Constant for use in filtering.



PNG_FILTER_PAETH
final public static int PNG_FILTER_PAETH(Code)
Constant for use in filtering.



PNG_FILTER_SUB
final public static int PNG_FILTER_SUB(Code)
Constant for use in filtering.



PNG_FILTER_UP
final public static int PNG_FILTER_UP(Code)
Constant for use in filtering.



bitDepth
protected int bitDepth(Code)



bitDepthSet
protected boolean bitDepthSet(Code)



chunkData
Vector chunkData(Code)



chunkType
Vector chunkType(Code)



transparencySet
boolean transparencySet(Code)





Method Detail
addPrivateChunk
public synchronized void addPrivateChunk(String type, byte[] data)(Code)
Adds a private chunk, in binary form, to the list of chunks to be stored with this image.
Parameters:
  type - a 4-character String giving the chunk type name.
Parameters:
  data - an array of bytes containing thechunk data.



filterRow
public int filterRow(byte[] currRow, byte[] prevRow, byte[][] scratchRows, int bytesPerRow, int bytesPerPixel)(Code)
Performs filtering on a row of an image. This method may be overridden in order to provide a custom algorithm for choosing the filter type for a given row.

The method is supplied with the current and previous rows of the image. For the first row of the image, or of an interlacing pass, the previous row array will be filled with zeros as required by the PNG specification.

The method is also supplied with five scratch arrays. These arrays may be used within the method for any purpose. At method exit, the array at the index given by the return value of the method should contain the filtered data. The return value will also be used as the filter type.

The default implementation of the method performs a trial encoding with each of the filter types, and computes the sum of absolute values of the differences between the raw bytes of the current row and the predicted values. The index of the filter producing the smallest result is returned.

As an example, to perform only 'sub' filtering, this method could be implemented (non-optimally) as follows:

 for (int i = bytesPerPixel; i < bytesPerRow + bytesPerPixel; i++) {
 int curr = currRow[i] & 0xff;
 int left = currRow[i - bytesPerPixel] & 0xff;
 scratchRow[PNG_FILTER_SUB][i] = (byte)(curr - left);
 }
 return PNG_FILTER_SUB;
 

Parameters:
  currRow - The current row as an array of bytesof length at least bytesPerRow + bytesPerPixel.The pixel data starts at index bytesPerPixel;the initial bytesPerPixel bytes are zero.
Parameters:
  prevRow - The current row as an array of bytesThe pixel data starts at index bytesPerPixel;the initial bytesPerPixel bytes are zero.
Parameters:
  scratchRows - An array of 5 byte arrays oflength at least bytesPerRow +bytesPerPixel, useable to hold temporary results.The filtered row will be returned as one of the entriesof this array. The returned filtered data should startat index bytesPerPixel; The initialbytesPerPixel bytes are not used.
Parameters:
  bytesPerRow - The number of bytes in the image row.This value will always be greater than 0.
Parameters:
  bytesPerPixel - The number of bytes representing a singlepixel, rounded up to an integer. This is the 'bpp' parameterdescribed in the PNG specification. The filter type to be used. The entry ofscratchRows[] at this index holds thefiltered data.



getBitDepth
public int getBitDepth()(Code)
Returns the desired bit depth for a grayscale image.

If the bit depth has not previously been set, or has been unset, an IllegalStateException will be thrown.
throws:
  IllegalStateException - if the bit depth is not set.




getChromaticity
public float[] getChromaticity()(Code)
Returns the white point and primary chromaticities in CIE (x, y) space.

See the documentation for the setChromaticity method for the format of the returned data.

If the chromaticity has not previously been set, or has been unset, an IllegalStateException will be thrown.
throws:
  IllegalStateException - if the chromaticity is not set.




getCompressedText
public String[] getCompressedText()(Code)
Returns the text strings to be stored in compressed form with this image as an array of Strings.

If the compressed text strings have not previously been set, or have been unset, an IllegalStateException will be thrown.
throws:
  IllegalStateException - if the compressed text strings arenot set.




getDefaultEncodeParam
public static PNGEncodeParam getDefaultEncodeParam(RenderedImage im)(Code)
Returns an instance of PNGEncodeParam.Palette, PNGEncodeParam.Gray, or PNGEncodeParam.RGB appropriate for encoding the given image.

If the image has an IndexColorModel, an instance of PNGEncodeParam.Palette is returned. Otherwise, if the image has 1 or 2 bands an instance of PNGEncodeParam.Gray is returned. In all other cases an instance of PNGEncodeParam.RGB is returned.

Note that this method does not provide any guarantee that the given image will be successfully encoded by the PNG encoder, as it only performs a very superficial analysis of the image structure.




getGamma
public float getGamma()(Code)
Returns the file gamma value for the image.

If the file gamma has not previously been set, or has been unset, an IllegalStateException will be thrown.
throws:
  IllegalStateException - if the gamma is not set.




getICCProfileData
public byte[] getICCProfileData()(Code)
Returns the ICC profile data to be stored with this image.

If the ICC profile has not previously been set, or has been unset, an IllegalStateException will be thrown.
throws:
  IllegalStateException - if the ICC profile is not set.




getICCProfileName
public String getICCProfileName()(Code)
Returns the ICC profile name.



getInterlacing
public boolean getInterlacing()(Code)
Returns true if Adam7 interlacing will be used.



getModificationTime
public Date getModificationTime()(Code)
Returns the modification time to be stored with this image.

If the bit depth has not previously been set, or has been unset, an IllegalStateException will be thrown.
throws:
  IllegalStateException - if the bit depth is not set.




getNumPrivateChunks
public synchronized int getNumPrivateChunks()(Code)
Returns the number of private chunks to be written to the output file.



getPaletteHistogram
public int[] getPaletteHistogram()(Code)
Returns the palette histogram to be stored with this image.

If the histogram has not previously been set, or has been unset, an IllegalStateException will be thrown.
throws:
  IllegalStateException - if the histogram is not set.




getPhysicalDimension
public int[] getPhysicalDimension()(Code)
Returns the physical dimension information to be stored with this image.

If the physical dimension information has not previously been set, or has been unset, an IllegalStateException will be thrown.
throws:
  IllegalStateException - if the physical dimension informationis not set.




getPrivateChunkData
public synchronized byte[] getPrivateChunkData(int index)(Code)
Returns the data associated of the private chunk at a given index, as an array of bytes. The index must be smaller than the return value of getNumPrivateChunks.



getPrivateChunkType
public synchronized String getPrivateChunkType(int index)(Code)
Returns the type of the private chunk at a given index, as a 4-character String. The index must be smaller than the return value of getNumPrivateChunks.



getSRGBIntent
public int getSRGBIntent()(Code)
Returns the sRGB rendering intent to be stored with this image.

If the sRGB intent has not previously been set, or has been unset, an IllegalStateException will be thrown.
throws:
  IllegalStateException - if the sRGB intent is not set.




getSignificantBits
public int[] getSignificantBits()(Code)
Returns the number of significant bits for each band of the image.

If the significant bits values have not previously been set, or have been unset, an IllegalStateException will be thrown.
throws:
  IllegalStateException - if the significant bits values arenot set.




getSuggestedPalette
public PNGSuggestedPaletteEntry[] getSuggestedPalette()(Code)
Returns the suggested palette information to be stored with this image.

If the suggested palette information has not previously been set, or has been unset, an IllegalStateException will be thrown.
throws:
  IllegalStateException - if the suggested paletteinformation is not set.




getText
public String[] getText()(Code)
Returns the text strings to be stored in uncompressed form with this image as an array of Strings.

If the text strings have not previously been set, or have been unset, an IllegalStateException will be thrown.
throws:
  IllegalStateException - if the text strings are not set.




isBackgroundSet
public boolean isBackgroundSet()(Code)
Returns true if a 'bKGD' chunk will be output. For API compatibility with JAI 1.0, the superclass defines this method to throw a RuntimeException; accordingly, subclasses must provide their own implementations.



isChromaticitySet
public boolean isChromaticitySet()(Code)
Returns true if a 'cHRM' chunk will be output.



isCompressedTextSet
public boolean isCompressedTextSet()(Code)
Returns true if a 'zTXT' chunk will be output.



isGammaSet
public boolean isGammaSet()(Code)
Returns true if a 'gAMA' chunk will be output.



isICCProfileDataSet
public boolean isICCProfileDataSet()(Code)
Returns true if a 'iCCP' chunk will be output.



isModificationTimeSet
public boolean isModificationTimeSet()(Code)
Returns true if a 'tIME' chunk will be output.



isPaletteHistogramSet
public boolean isPaletteHistogramSet()(Code)
Returns true if a 'hIST' chunk will be output.



isPhysicalDimensionSet
public boolean isPhysicalDimensionSet()(Code)
Returns true if a 'pHYS' chunk will be output.



isSRGBIntentSet
public boolean isSRGBIntentSet()(Code)
Returns true if an 'sRGB' chunk will be output.



isSignificantBitsSet
public boolean isSignificantBitsSet()(Code)
Returns true if an 'sBIT' chunk will be output.



isSuggestedPaletteSet
public boolean isSuggestedPaletteSet()(Code)
Returns true if a 'sPLT' chunk will be output.



isTextSet
public boolean isTextSet()(Code)
Returns true if a 'tEXt' chunk will be output.



isTransparencySet
public boolean isTransparencySet()(Code)
Returns true if a 'tRNS' chunk will be output.



paethPredictor
final public static int paethPredictor(int a, int b, int c)(Code)
The Paeth predictor routine used in PNG encoding. This routine is included as a convenience to subclasses that override the filterRow method.



removeAllPrivateChunks
public synchronized void removeAllPrivateChunks()(Code)
Remove all private chunks associated with this parameter instance.



removeUnsafeToCopyPrivateChunks
public synchronized void removeUnsafeToCopyPrivateChunks()(Code)
Remove all private chunks associated with this parameter instance whose 'safe-to-copy' bit is not set. This may be advisable when transcoding PNG images.



setBitDepth
abstract public void setBitDepth(int bitDepth)(Code)
Sets the desired bit depth of an image.



setChromaticity
public void setChromaticity(float[] chromaticity)(Code)
Sets the white point and primary chromaticities in CIE (x, y) space.

The chromaticity parameter should be a float array of length 8 containing the white point X and Y, red X and Y, green X and Y, and blue X and Y values in order.

The 'cHRM' chunk will encode this information.




setChromaticity
public void setChromaticity(float whitePointX, float whitePointY, float redX, float redY, float greenX, float greenY, float blueX, float blueY)(Code)
A convenience method that calls the array version.



setCompressedText
public void setCompressedText(String[] text)(Code)
Sets the text strings to be stored in compressed form with this image. The data is passed to this method as an array of Strings.

The 'zTXt' chunk will encode this information.




setGamma
public void setGamma(float gamma)(Code)
Sets the file gamma value for the image.

The 'gAMA' chunk will encode this information.




setICCProfileData
public void setICCProfileData(byte[] ICCProfileData)(Code)
Sets the ICC profile data to be stored with this image. The profile is represented in raw binary form.

The 'iCCP' chunk will encode this information.




setICCProfileName
public void setICCProfileName(String name)(Code)
Sets the ICC profile name.



setInterlacing
public void setInterlacing(boolean useInterlacing)(Code)
Turns Adam7 interlacing on or off.



setModificationTime
public void setModificationTime(Date modificationTime)(Code)
Sets the modification time, as a Date, to be stored with this image. The internal storage format will use UTC regardless of how the modificationTime parameter was created.

The 'tIME' chunk will encode this information.




setPaletteHistogram
public void setPaletteHistogram(int[] paletteHistogram)(Code)
Sets the palette histogram to be stored with this image. The histogram consists of an array of integers, one per palette entry.

The 'hIST' chunk will encode this information.




setPhysicalDimension
public void setPhysicalDimension(int[] physicalDimension)(Code)
Sets the physical dimension information to be stored with this image. The physicalDimension parameter should be a 3-entry array containing the number of pixels per unit in the X direction, the number of pixels per unit in the Y direction, and the unit specifier (0 = unknown, 1 = meters).

The 'pHYS' chunk will encode this information.




setPhysicalDimension
public void setPhysicalDimension(int xPixelsPerUnit, int yPixelsPerUnit, int unitSpecifier)(Code)
A convenience method that calls the array version.



setSRGBIntent
public void setSRGBIntent(int SRGBIntent)(Code)
Sets the sRGB rendering intent to be stored with this image. The legal values are 0 = Perceptual, 1 = Relative Colorimetric, 2 = Saturation, and 3 = Absolute Colorimetric. Refer to the PNG specification for information on these values.

The 'sRGB' chunk will encode this information.




setSignificantBits
public void setSignificantBits(int[] significantBits)(Code)
Sets the number of significant bits for each band of the image.

The number of entries in the significantBits array must be equal to the number of output bands in the image: 1 for a gray image, 2 for gray+alpha, 3 for index or truecolor, and 4 for truecolor+alpha.

The 'sBIT' chunk will encode this information.




setSuggestedPalette
public void setSuggestedPalette(PNGSuggestedPaletteEntry[] palette)(Code)
Sets the suggested palette information to be stored with this image. The information is passed to this method as an array of PNGSuggestedPaletteEntry objects.

The 'sPLT' chunk will encode this information.




setText
public void setText(String[] text)(Code)
Sets the textual data to be stored in uncompressed form with this image. The data is passed to this method as an array of Strings.

The 'tEXt' chunk will encode this information.




unsetBackground
public void unsetBackground()(Code)
Suppresses the 'bKGD' chunk from being output. For API compatibility with JAI 1.0, the superclass defines this method to throw a RuntimeException; accordingly, subclasses must provide their own implementations.



unsetBitDepth
public void unsetBitDepth()(Code)
Suppresses the setting of the bit depth of a grayscale image. The depth of the encoded image will be inferred from the source image bit depth, rounded up to the next power of 2 between 1 and 16.



unsetChromaticity
public void unsetChromaticity()(Code)
Suppresses the 'cHRM' chunk from being output.



unsetCompressedText
public void unsetCompressedText()(Code)
Suppresses the 'zTXt' chunk from being output.



unsetGamma
public void unsetGamma()(Code)
Suppresses the 'gAMA' chunk from being output.



unsetICCProfileData
public void unsetICCProfileData()(Code)
Suppresses the 'iCCP' chunk from being output.



unsetModificationTime
public void unsetModificationTime()(Code)
Suppresses the 'tIME' chunk from being output.



unsetPaletteHistogram
public void unsetPaletteHistogram()(Code)
Suppresses the 'hIST' chunk from being output.



unsetPhysicalDimension
public void unsetPhysicalDimension()(Code)
Suppresses the 'pHYS' chunk from being output.



unsetSRGBIntent
public void unsetSRGBIntent()(Code)
Suppresses the 'sRGB' chunk from being output.



unsetSignificantBits
public void unsetSignificantBits()(Code)
Suppresses the 'sBIT' chunk from being output.



unsetSuggestedPalette
public void unsetSuggestedPalette()(Code)
Suppresses the 'sPLT' chunk from being output.



unsetText
public void unsetText()(Code)
Suppresses the 'tEXt' chunk from being output.



unsetTransparency
public void unsetTransparency()(Code)
Suppresses the 'tRNS' chunk from being output.



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.