viewer
Class JAIManipBean

java.lang.Object
  |
  +--viewer.JAIManipBean

public class JAIManipBean
extends java.lang.Object

An image manipulation bean that can be used in the server side. It can be instantiated by a servlet or a JSP page. It uses the JAI operators to load and manipulate images.

Version:
1.0 10 October 2000
Author:
Lawrence Rodrigues

Field Summary
protected  javax.media.jai.PlanarImage image
           
protected  double magFactor
           
protected  double rotationAngle
           
 
Constructor Summary
JAIManipBean()
           
 
Method Summary
 double getMagFactor()
           
 double getRotationAngle()
           
protected  javax.media.jai.PlanarImage manip(javax.media.jai.PlanarImage image, double rot, double mag)
           
 void manipAndPost(java.lang.String imagepath, java.io.OutputStream out)
           
static javax.media.jai.PlanarImage readAsPlanarImage(java.lang.String filename)
           
 javax.media.jai.RenderedOp rotate(javax.media.jai.PlanarImage image, double ang)
           
static void saveAsJPEG(java.awt.image.RenderedImage image, java.io.OutputStream out)
           
 javax.media.jai.RenderedOp scale(javax.media.jai.PlanarImage image, double magx, double magy)
           
 void setMagFactor(double mag)
           
 void setRotationAngle(double rot)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rotationAngle

protected double rotationAngle

magFactor

protected double magFactor

image

protected javax.media.jai.PlanarImage image
Constructor Detail

JAIManipBean

public JAIManipBean()
Method Detail

setRotationAngle

public void setRotationAngle(double rot)

getRotationAngle

public double getRotationAngle()

setMagFactor

public void setMagFactor(double mag)

getMagFactor

public double getMagFactor()

manipAndPost

public void manipAndPost(java.lang.String imagepath,
                         java.io.OutputStream out)

readAsPlanarImage

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

saveAsJPEG

public static void saveAsJPEG(java.awt.image.RenderedImage image,
                              java.io.OutputStream out)

manip

protected javax.media.jai.PlanarImage manip(javax.media.jai.PlanarImage image,
                                            double rot,
                                            double mag)

scale

public javax.media.jai.RenderedOp scale(javax.media.jai.PlanarImage image,
                                        double magx,
                                        double magy)

rotate

public javax.media.jai.RenderedOp rotate(javax.media.jai.PlanarImage image,
                                         double ang)