org.mentawai.util
Class ImageUtils

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

public class ImageUtils
extends Object


Constructor Summary
ImageUtils()
           
 
Method Summary
static Image createImage(byte[] data)
           
static Image crop(Image source, int x1, int y1, int x2, int y2)
           
static Dimension getSize(byte[] data)
           
static Image loadImage(String filename)
           
static Image resize(Image img, int newWidth, float quality)
           
static BufferedImage toBufferedImage(Image img)
           
static byte[] toByteArray(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 Dimension getSize(byte[] data)

createImage

public static Image createImage(byte[] data)

resize

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

toBufferedImage

public static BufferedImage toBufferedImage(Image img)

toByteArray

public static byte[] toByteArray(Image img)
                          throws IOException
Throws:
IOException

crop

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

loadImage

public static Image loadImage(String filename)


Copyright © 2013. All Rights Reserved.