org.deegree_impl.model.resources
Class Images

java.lang.Object
  extended byorg.deegree_impl.model.resources.Images

public final class Images
extends java.lang.Object

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 the "official" package, but instead in this private one. Do not rely on this API! It may change in incompatible way in any future version.

Version:
1.0
Author:
Martin Desruisseaux

Field Summary
private static java.awt.Dimension DEFAULT_TILE_SIZE
          The default tile size.
private static int MIN_TILE_SIZE
          The minimum tile size.
 
Constructor Summary
private Images()
          Do not allow creation of instances of this class.
 
Method Summary
static ImageLayout getImageLayout(java.awt.image.RenderedImage image)
          Suggest an ImageLayout for the specified image.
private static ImageLayout getImageLayout(java.awt.image.RenderedImage image, boolean initToImage)
          Returns an ImageLayout for the specified image.
static java.awt.RenderingHints getRenderingHints(java.awt.image.RenderedImage image)
          Suggest a set of RenderingHints for the specified image.
static java.awt.Dimension toTileSize(java.awt.Dimension size)
          Suggest a tile size for the specified image size.
private static int toTileSize(int imageSize, int tileSize)
          Suggest a tile size close to tileSize for the specified imageSize.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TILE_SIZE

private static final java.awt.Dimension DEFAULT_TILE_SIZE
The default tile size. This default tile size can be overriden with a call to JAI#setDefaultTileSize.


MIN_TILE_SIZE

private static final int MIN_TILE_SIZE
The minimum tile size.

See Also:
Constant Field Values
Constructor Detail

Images

private Images()
Do not allow creation of instances of this class.

Method Detail

getImageLayout

public static ImageLayout getImageLayout(java.awt.image.RenderedImage image)
Suggest an ImageLayout for the specified image. All parameters are initially set equal to those of the given RenderedImage, and then the tile size is updated according the image's size. This method never returns null.


getImageLayout

private static ImageLayout getImageLayout(java.awt.image.RenderedImage image,
                                          boolean initToImage)
Returns an ImageLayout for the specified image. If initToImage is true, then All parameters are initially set equal to those of the given RenderedImage and the returned layout is never null.


getRenderingHints

public static java.awt.RenderingHints getRenderingHints(java.awt.image.RenderedImage image)
Suggest a set of RenderingHints for the specified image. The rendering hints may include the following parameters: This method may returns null if no rendering hints is proposed.


toTileSize

public static java.awt.Dimension toTileSize(java.awt.Dimension size)
Suggest 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 returns size for convenience.


toTileSize

private static int toTileSize(int imageSize,
                              int tileSize)
Suggest a tile size close to tileSize for the specified imageSize. If this method can't suggest a size, then it returns 0.