org.mentawai.util
Class ImageUtils

java.lang.Object
  extended by org.mentawai.util.ImageUtils

public class ImageUtils
extends java.lang.Object


Constructor Summary
ImageUtils()
           
 
Method Summary
static java.awt.Image createImage(byte[] data)
           
static java.awt.Image crop(java.awt.Image source, int x1, int y1, int x2, int y2)
           
static java.awt.Dimension getSize(byte[] data)
           
static java.awt.Image loadImage(java.lang.String filename)
           
static java.awt.Image resize(java.awt.Image img, int newWidth, float quality)
           
static java.awt.image.BufferedImage toBufferedImage(java.awt.Image img)
           
static byte[] toByteArray(java.awt.Image img)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageUtils

public ImageUtils()
Method Detail

getSize

public static java.awt.Dimension getSize(byte[] data)

createImage

public static java.awt.Image createImage(byte[] data)

resize

public static java.awt.Image resize(java.awt.Image img,
                                    int newWidth,
                                    float quality)
                             throws java.io.IOException
Throws:
java.io.IOException

toBufferedImage

public static java.awt.image.BufferedImage toBufferedImage(java.awt.Image img)

toByteArray

public static byte[] toByteArray(java.awt.Image img)
                          throws java.io.IOException
Throws:
java.io.IOException

crop

public static java.awt.Image crop(java.awt.Image source,
                                  int x1,
                                  int y1,
                                  int x2,
                                  int y2)

loadImage

public static java.awt.Image loadImage(java.lang.String filename)


Copyright © 2005 Mentawai Team. All Rights Reserved.