|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.resources.image.ImageUtilities
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.
Method Summary | |
static void |
allowNativeAcceleration(java.lang.String operation,
boolean allowed)
Deprecated. Moved to Registry.setNativeAccelerationAllowed(java.lang.String, boolean) . |
static void |
allowNativeCodec(java.lang.String format,
boolean writer,
boolean allowed)
Allows or disallows native acceleration for the specified image format. |
static javax.media.jai.ImageLayout |
createIntersection(javax.media.jai.ImageLayout layout,
java.util.List sources)
Computes a new ImageLayout which is the intersection of the specified
and all s in the supplied list. |
static javax.media.jai.ImageLayout |
getImageLayout(java.awt.image.RenderedImage image)
Suggests an ImageLayout for the specified image. |
static java.lang.String |
getInterpolationName(javax.media.jai.Interpolation interp)
Returns the interpolation name for the specified interpolation object. |
static java.awt.RenderingHints |
getRenderingHints(java.awt.image.RenderedImage image)
Suggest a set of RenderingHints for the specified image.
|
static javax.media.jai.Interpolation |
toInterpolation(java.lang.Object type)
Casts the specified object to an object . |
static java.awt.Dimension |
toTileSize(java.awt.Dimension size)
Suggests a tile size for the specified image size. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static javax.media.jai.ImageLayout getImageLayout(java.awt.image.RenderedImage image)
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 .
public static java.awt.RenderingHints getRenderingHints(java.awt.image.RenderedImage image)
RenderingHints
for the specified image.
The rendering hints may include the following parameters:
JAI.KEY_IMAGE_LAYOUT
with a proposed tile size.
public static java.awt.Dimension toTileSize(java.awt.Dimension size)
public static javax.media.jai.ImageLayout createIntersection(javax.media.jai.ImageLayout layout, java.util.List sources)
ImageLayout
which is the intersection of the specified
and all s in the supplied list. If the
minX
, minY
,
width
and height
properties are not defined in the , then they will be inherited
from the first source for consistency with OpImage
constructor.
layout
- The original layout. This object will not be modified.sources
- The list of sources RenderedImage
.
public static javax.media.jai.Interpolation toInterpolation(java.lang.Object type) throws java.lang.IllegalArgumentException
object
.
type
- The interpolation type as an Interpolation
or a CharSequence
object.
java.lang.IllegalArgumentException
- if the specified interpolation type is not a know one.public static java.lang.String getInterpolationName(javax.media.jai.Interpolation interp)
public static void allowNativeAcceleration(java.lang.String operation, boolean allowed)
Registry.setNativeAccelerationAllowed(java.lang.String, boolean)
.
ImageLayout
rendering hint cause
an exception in medialib native code. Disabling the native acceleration (i.e using the pure
Java version) is a convenient workaround until Sun fix the bug.
Implementation note: the current implementation assumes that factories for native implementations are declared in the package, while factories for pure java implementations are declared in the package. It work for Sun's 1.1.2 implementation, but may change in future versions. If this method doesn't recognize the package, it does nothing.
operation
- The operation name (e.g. "Affine").allowed
- to disallow native acceleration.public static void allowNativeCodec(java.lang.String format, boolean writer, boolean allowed)
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.
format
- The format name (e.g. "png").writer
- to set the reader, or to set the writer.allowed
- to disallow native acceleration.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |