org.mmbase.module.builders
Class ConvertJAI

java.lang.Object
  |
  +--org.mmbase.module.builders.ConvertJAI
All Implemented Interfaces:
ImageConvertInterface

public class ConvertJAI
extends java.lang.Object
implements ImageConvertInterface

Converts Images using image Java Advanced Imaging

Version:
$Id: ConvertJAI.java,v 1.5 2001/03/26 14:12:18 install Exp $
Author:
Daniel Ockeloen

Constructor Summary
ConvertJAI()
           
 
Method Summary
 byte[] ConvertImage(byte[] input, java.util.Vector commands)
           
static javax.media.jai.PlanarImage crop(javax.media.jai.PlanarImage inImg, int x1, int y1, int x2, int y2)
           
static javax.media.jai.PlanarImage flipx(javax.media.jai.PlanarImage inImg)
           
static javax.media.jai.PlanarImage flipy(javax.media.jai.PlanarImage inImg)
           
static float getDeg2Rad(float deg)
           
 void init(java.util.Hashtable params)
           
static javax.media.jai.PlanarImage loadImage(java.lang.String filename)
           
static javax.media.jai.PlanarImage rotate(javax.media.jai.PlanarImage inImg, int x, int y, int a)
           
static javax.media.jai.PlanarImage scale(javax.media.jai.PlanarImage inImg, float sx, float sy)
           
static javax.media.jai.PlanarImage size(javax.media.jai.PlanarImage inImg, int max)
           
static javax.media.jai.PlanarImage size(javax.media.jai.PlanarImage inImg, int x, int y)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvertJAI

public ConvertJAI()
Method Detail

init

public void init(java.util.Hashtable params)
Specified by:
init in interface ImageConvertInterface

ConvertImage

public byte[] ConvertImage(byte[] input,
                           java.util.Vector commands)
Specified by:
ConvertImage in interface ImageConvertInterface

scale

public static javax.media.jai.PlanarImage scale(javax.media.jai.PlanarImage inImg,
                                                float sx,
                                                float sy)

crop

public static javax.media.jai.PlanarImage crop(javax.media.jai.PlanarImage inImg,
                                               int x1,
                                               int y1,
                                               int x2,
                                               int y2)

size

public static javax.media.jai.PlanarImage size(javax.media.jai.PlanarImage inImg,
                                               int max)
Parameters:
inImg - the input image
max - the maximum size of the image x and y in pixels
Returns:
an image that will fit in max*max. The aspect ratio is not changed

size

public static javax.media.jai.PlanarImage size(javax.media.jai.PlanarImage inImg,
                                               int x,
                                               int y)

rotate

public static javax.media.jai.PlanarImage rotate(javax.media.jai.PlanarImage inImg,
                                                 int x,
                                                 int y,
                                                 int a)

flipx

public static javax.media.jai.PlanarImage flipx(javax.media.jai.PlanarImage inImg)

flipy

public static javax.media.jai.PlanarImage flipy(javax.media.jai.PlanarImage inImg)

loadImage

public static javax.media.jai.PlanarImage loadImage(java.lang.String filename)

getDeg2Rad

public static float getDeg2Rad(float deg)


MMBase 2001