Java Doc for ImageUtilities.java in  » GIS » GeoTools-2.4.1 » org » geotools » resources » image » 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 » GIS » GeoTools 2.4.1 » org.geotools.resources.image 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.resources.image.ImageUtilities

ImageUtilities
final public class ImageUtilities (Code)
A set of static methods working on images. Some of those methods are useful, but not really rigorous. This is why they do not appear in any "official" package, but instead in this private one. Do not rely on this API! It may change in incompatible way in any future version.
since:
   2.0
version:
   $Id: ImageUtilities.java 26890 2007-09-07 11:05:40Z desruisseaux $
author:
   Martin Desruisseaux
author:
   Simone Giannecchini


Field Summary
final public static  RenderingHintsDONT_REPLACE_INDEX_COLOR_MODEL
    RenderingHints used to prevent JAI operations from expanding IndexColorModel s.
final public static  RenderingHintsEXTEND_BORDER_BY_COPYING
     Cached instance of a RenderingHints for controlling border extension on JAI operations.
final public static  RenderingHintsEXTEND_BORDER_BY_REFLECT
     Cached instance of a RenderingHints for controlling border extension on JAI operations.
final public static  RenderingHintsNN_INTERPOLATION_HINT
    RenderingHints for requesting Nearest Neighbor intepolation.
final public static  RenderingHintsNOCACHE_HINT
    RenderingHints for avoiding caching of JAI RenderedOp s.
final public static  RenderingHintsREPLACE_INDEX_COLOR_MODEL
    RenderingHints used to force JAI operations to expand IndexColorModel s.


Method Summary
public static synchronized  voidallowNativeCodec(String format, boolean writer, boolean allowed)
     Allows or disallows native acceleration for the specified image format.
public static  ImageLayoutcreateIntersection(ImageLayout layout, List sources)
     Computes a new ImageLayout which is the intersection of the specified ImageLayout and all RenderedImage s in the supplied list.
public static  ImageLayoutgetImageLayout(RenderedImage image)
     Suggests an ImageLayout for the specified image.
public static  StringgetInterpolationName(Interpolation interp)
     Returns the interpolation name for the specified interpolation object.
public static  RenderingHintsgetRenderingHints(RenderedImage image)
     Suggests a set of RenderingHints for the specified image.
public static  RenderedOptileImage(RenderedOp image)
     Tiles the specified image.
public static  InterpolationtoInterpolation(Object type)
     Casts the specified object to an Interpolation object .
Parameters:
  type - The interpolation type as an Interpolation or a CharSequenceobject.
public static  DimensiontoTileSize(Dimension size)
     Suggests a tile size for the specified image size.

Field Detail
DONT_REPLACE_INDEX_COLOR_MODEL
final public static RenderingHints DONT_REPLACE_INDEX_COLOR_MODEL(Code)
RenderingHints used to prevent JAI operations from expanding IndexColorModel s.



EXTEND_BORDER_BY_COPYING
final public static RenderingHints EXTEND_BORDER_BY_COPYING(Code)
Cached instance of a RenderingHints for controlling border extension on JAI operations. It contains an instance of a BorderExtenderCopy .



EXTEND_BORDER_BY_REFLECT
final public static RenderingHints EXTEND_BORDER_BY_REFLECT(Code)
Cached instance of a RenderingHints for controlling border extension on JAI operations. It contains an instance of a BorderExtenderReflect .



NN_INTERPOLATION_HINT
final public static RenderingHints NN_INTERPOLATION_HINT(Code)
RenderingHints for requesting Nearest Neighbor intepolation.



NOCACHE_HINT
final public static RenderingHints NOCACHE_HINT(Code)
RenderingHints for avoiding caching of JAI RenderedOp s.



REPLACE_INDEX_COLOR_MODEL
final public static RenderingHints REPLACE_INDEX_COLOR_MODEL(Code)
RenderingHints used to force JAI operations to expand IndexColorModel s.





Method Detail
allowNativeCodec
public static synchronized void allowNativeCodec(String format, boolean writer, boolean allowed)(Code)
Allows or disallows native acceleration for the specified image format. By default, the image I/O extension for JAI provides native acceleration for PNG and JPEG. Unfortunatly, those native codec has bug in their 1.0 version. Invoking this method will force the use of standard codec provided in J2SE 1.4.

Implementation note: the current implementation assume that JAI codec class name start with "CLib". It work for Sun's 1.0 implementation, but may change in future versions. If this method doesn't recognize the class name, it does nothing.
Parameters:
  format - The format name (e.g. "png").
Parameters:
  writer - false to set the reader, or true to set the writer.
Parameters:
  allowed - false to disallow native acceleration.




createIntersection
public static ImageLayout createIntersection(ImageLayout layout, List sources)(Code)
Computes a new ImageLayout which is the intersection of the specified ImageLayout and all RenderedImage s in the supplied list. If the ImageLayout.getMinX minX , ImageLayout.getMinY minY , ImageLayout.getWidth width and ImageLayout.getHeight height properties are not defined in the layout , then they will be inherited from the first source for consistency with OpImage constructor.
Parameters:
  layout - The original layout. This object will not be modified.
Parameters:
  sources - The list of sources RenderedImage. A new ImageLayout , or the original layout if no change was needed.



getImageLayout
public static ImageLayout getImageLayout(RenderedImage image)(Code)
Suggests an ImageLayout for the specified image. All parameters are initially set equal to those of the given RenderedImage , and then the . This method never returns null .



getInterpolationName
public static String getInterpolationName(Interpolation interp)(Code)
Returns the interpolation name for the specified interpolation object. This method tries to infer the name from the object's class name.
Parameters:
  Interpolation - The interpolation object.



getRenderingHints
public static RenderingHints getRenderingHints(RenderedImage image)(Code)
Suggests a set of RenderingHints for the specified image. The rendering hints may include the following parameters:
  • JAI.KEY_IMAGE_LAYOUT with a proposed tile size.
This method may returns null if no rendering hints is proposed.



tileImage
public static RenderedOp tileImage(RenderedOp image) throws IOException(Code)
Tiles the specified image. ImageLayoutImageUtilities.getRenderingHints
throws:
  IOException - If an I/O operation were required (in order to check if the imagewere tiled on disk) and failed.
since:
   2.3



toInterpolation
public static Interpolation toInterpolation(Object type) throws IllegalArgumentException(Code)
Casts the specified object to an Interpolation object .
Parameters:
  type - The interpolation type as an Interpolation or a CharSequenceobject. The interpolation object for the specified type.
throws:
  IllegalArgumentException - if the specified interpolation type is not a know one.



toTileSize
public static Dimension toTileSize(Dimension size)(Code)
Suggests a tile size for the specified image size. On input, size is the image's size. On output, it is the tile size. This method write the result directly in the supplied object and returns size for convenience.

This method it aimed to computing a tile size such that the tile grid would have overlapped the image bound in order to avoid having tiles crossing the image bounds and being therefore partially empty. This method will never returns a tile size smaller than . If this method can't suggest a size, then it left the corresponding size field ( Dimension.width width or Dimension.height height ) unchanged.

The Dimension.width width and Dimension.height height fields are processed independently in the same way. The following discussion use the width field as an example.

This method inspects different tile sizes close to the . Lets width be the default tile width. Values are tried in the following order: width , width+1 , width-1 , width+2 , width-2 , width+3 , width-3 , etc. until one of the following happen:

  • A suitable tile size is found. More specifically, a size is found which is a dividor of the specified image size, and is the closest one of the default tile size. The Dimension field ( width or height ) is set to this value.
  • An arbitrary limit (both a minimum and a maximum tile size) is reached. In this case, this method may set the Dimension field to a value that maximize the remainder of image size / tile size (in other words, the size that left as few empty pixels as possible).



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.