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


java.lang.Object
   com.sun.media.imageioimpl.common.ImageUtil

ImageUtil
public class ImageUtil (Code)




Method Summary
final public static  voidcanEncodeImage(ImageWriter writer, ImageTypeSpecifier type)
     Checks that the provided ImageWriter can encode the provided ImageTypeSpecifier or not.
final public static  voidcanEncodeImage(ImageWriter writer, ColorModel colorModel, SampleModel sampleModel)
     Checks that the provided ImageWriter can encode the provided ColorModel and SampleModel.
public static  StringconvertObjectToString(Object obj)
    
final public static  ColorModelcreateColorModel(SampleModel sampleModel)
     Creates a ColorModel that may be used with the specified SampleModel.
public static  ColorModelcreateColorModel(ColorSpace colorSpace, SampleModel sampleModel)
    
public static  longgetBandSize(SampleModel sm)
    
final public static  ImageTypeSpecifiergetDestinationType(ImageReadParam param, Iterator imageTypes)
     Gets the destination image type.
public static  intgetElementSize(SampleModel sm)
    
public static  ListgetJDKImageReaderWriterSPI(ServiceRegistry registry, String formatName, boolean isReader)
    
public static  byte[]getPackedBinaryData(Raster raster, Rectangle rect)
     For the case of binary data (isBinary() returns true), return the binary data as a packed byte array. The data will be packed as eight bits per byte with no bit offset, i.e., the first bit in each image line will be the left-most of the first byte of the line.
public static  longgetTileSize(SampleModel sm)
    
public static  byte[]getUnpackedBinaryData(Raster raster, Rectangle rect)
     Returns the binary data unpacked into an array of bytes.
final public static  booleanimageIsContiguous(RenderedImage image)
     Returns whether the image has contiguous data across rows.
public static  booleanisBinary(SampleModel sm)
    
public static  booleanisGrayscaleMapping(IndexColorModel icm)
     Tests whether the color indices represent a gray-scale image with the indicated number of bits over the color component range [0,255]. The grayscale mapping may be inverted, i.e., 0 -> 255 and mapSize -> 0.
Parameters:
  icm - The gray-to-color mapping.
public static  booleanisIndicesForGrayscale(byte[] r, byte[] g, byte[] b)
     Tests whether the color indices represent a gray-scale image.
Parameters:
  r - The red channel color indices.
Parameters:
  g - The green channel color indices.
Parameters:
  b - The blue channel color indices.
public static  booleanisNonStandardICCColorSpace(ColorSpace cs)
     Returns true if the given ColorSpace object is an instance of ICC_ColorSpace but is not one of the standard ColorSpaces returned by ColorSpace.getInstance().
public static  voidprocessOnRegistration(ServiceRegistry registry, Class category, String formatName, ImageReaderWriterSpi spi, int deregisterJvmVersion, int priorityJvmVersion)
    
public static  intreadMultiByteInteger(ImageInputStream iis)
    
public static  voidsetPackedBinaryData(byte[] binaryDataArray, WritableRaster raster, Rectangle rect)
     Sets the supplied Raster's data from an array of packed binary data of the form returned by getPackedBinaryData().
public static  voidsetUnpackedBinaryData(byte[] bdata, WritableRaster raster, Rectangle rect)
     Copies data into the packed array of the Raster from an array of unpacked data of the form returned by getUnpackedBinaryData().



Method Detail
canEncodeImage
final public static void canEncodeImage(ImageWriter writer, ImageTypeSpecifier type) throws IIOException(Code)
Checks that the provided ImageWriter can encode the provided ImageTypeSpecifier or not. If not, an IIOException will be thrown.
Parameters:
  writer - The provided ImageWriter.
Parameters:
  type - The image to be tested.
throws:
  IIOException - If the writer cannot encoded the provided image.



canEncodeImage
final public static void canEncodeImage(ImageWriter writer, ColorModel colorModel, SampleModel sampleModel) throws IIOException(Code)
Checks that the provided ImageWriter can encode the provided ColorModel and SampleModel. If not, an IIOException will be thrown.
Parameters:
  writer - The provided ImageWriter.
Parameters:
  colorModel - The provided ColorModel.
Parameters:
  sampleModel - The provided SampleModel.
throws:
  IIOException - If the writer cannot encoded the provided image.



convertObjectToString
public static String convertObjectToString(Object obj)(Code)
Converts the provided object to String



createColorModel
final public static ColorModel createColorModel(SampleModel sampleModel)(Code)
Creates a ColorModel that may be used with the specified SampleModel. If a suitable ColorModel cannot be found, this method returns null.

Suitable ColorModels are guaranteed to exist for all instances of ComponentSampleModel. For 1- and 3- banded SampleModels, the returned ColorModel will be opaque. For 2- and 4-banded SampleModels, the output will use alpha transparency which is not premultiplied. 1- and 2-banded data will use a grayscale ColorSpace, and 3- and 4-banded data a sRGB ColorSpace. Data with 5 or more bands will have a BogusColorSpace.

An instance of DirectColorModel will be created for instances of SinglePixelPackedSampleModel with no more than 4 bands.

An instance of IndexColorModel will be created for instances of MultiPixelPackedSampleModel. The colormap will be a grayscale ramp with 1 << numberOfBits entries ranging from zero to at most 255.

An instance of ColorModel that is suitable forthe supplied SampleModel, or null.
throws:
  IllegalArgumentException - If sampleModel isnull.



createColorModel
public static ColorModel createColorModel(ColorSpace colorSpace, SampleModel sampleModel)(Code)



getBandSize
public static long getBandSize(SampleModel sm)(Code)



getDestinationType
final public static ImageTypeSpecifier getDestinationType(ImageReadParam param, Iterator imageTypes) throws IIOException(Code)
Gets the destination image type.



getElementSize
public static int getElementSize(SampleModel sm)(Code)



getJDKImageReaderWriterSPI
public static List getJDKImageReaderWriterSPI(ServiceRegistry registry, String formatName, boolean isReader)(Code)



getPackedBinaryData
public static byte[] getPackedBinaryData(Raster raster, Rectangle rect)(Code)
For the case of binary data (isBinary() returns true), return the binary data as a packed byte array. The data will be packed as eight bits per byte with no bit offset, i.e., the first bit in each image line will be the left-most of the first byte of the line. The line stride in bytes will be (int)((getWidth()+7)/8). The length of the returned array will be the line stride multiplied by getHeight() the binary data as a packed array of bytes with zero offsetof null if the data are not binary.
throws:
  IllegalArgumentException - if isBinary() returnsfalse with the SampleModel of thesupplied Raster as argument.



getTileSize
public static long getTileSize(SampleModel sm)(Code)



getUnpackedBinaryData
public static byte[] getUnpackedBinaryData(Raster raster, Rectangle rect)(Code)
Returns the binary data unpacked into an array of bytes. The line stride will be the width of the Raster.
throws:
  IllegalArgumentException - if isBinary() returnsfalse with the SampleModel of thesupplied Raster as argument.



imageIsContiguous
final public static boolean imageIsContiguous(RenderedImage image)(Code)
Returns whether the image has contiguous data across rows.



isBinary
public static boolean isBinary(SampleModel sm)(Code)



isGrayscaleMapping
public static boolean isGrayscaleMapping(IndexColorModel icm)(Code)
Tests whether the color indices represent a gray-scale image with the indicated number of bits over the color component range [0,255]. The grayscale mapping may be inverted, i.e., 0 -> 255 and mapSize -> 0.
Parameters:
  icm - The gray-to-color mapping. Whether the IndexColorModel maps indexi to ((255*i)/icm.getMapSize()-1).
throws:
  IllegalArgumentException - if icm isnull.



isIndicesForGrayscale
public static boolean isIndicesForGrayscale(byte[] r, byte[] g, byte[] b)(Code)
Tests whether the color indices represent a gray-scale image.
Parameters:
  r - The red channel color indices.
Parameters:
  g - The green channel color indices.
Parameters:
  b - The blue channel color indices. If all the indices have 256 entries, and are identical mappings,return true; otherwise, return false.



isNonStandardICCColorSpace
public static boolean isNonStandardICCColorSpace(ColorSpace cs)(Code)
Returns true if the given ColorSpace object is an instance of ICC_ColorSpace but is not one of the standard ColorSpaces returned by ColorSpace.getInstance().
Parameters:
  cs - The ColorSpace to test.



processOnRegistration
public static void processOnRegistration(ServiceRegistry registry, Class category, String formatName, ImageReaderWriterSpi spi, int deregisterJvmVersion, int priorityJvmVersion)(Code)



readMultiByteInteger
public static int readMultiByteInteger(ImageInputStream iis) throws IOException(Code)



setPackedBinaryData
public static void setPackedBinaryData(byte[] binaryDataArray, WritableRaster raster, Rectangle rect)(Code)
Sets the supplied Raster's data from an array of packed binary data of the form returned by getPackedBinaryData().
throws:
  IllegalArgumentException - if isBinary() returnsfalse with the SampleModel of thesupplied Raster as argument.



setUnpackedBinaryData
public static void setUnpackedBinaryData(byte[] bdata, WritableRaster raster, Rectangle rect)(Code)
Copies data into the packed array of the Raster from an array of unpacked data of the form returned by getUnpackedBinaryData().

If the data are binary, then the target bit will be set if and only if the corresponding byte is non-zero.
throws:
  IllegalArgumentException - if isBinary() returnsfalse with the SampleModel of thesupplied Raster as argument.




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.