net.sourceforge.atunes.utils
Class ImageUtils

java.lang.Object
  extended by net.sourceforge.atunes.utils.ImageUtils

public class ImageUtils
extends java.lang.Object

The Class ImageUtils.


Constructor Summary
ImageUtils()
           
 
Method Summary
static javax.swing.ImageIcon resize(javax.swing.ImageIcon image, int width, int height)
          Resizes an ImageIcon object.
static javax.swing.ImageIcon resizeImage(java.awt.Image img, int width, int height)
          Resizes an image with Bicubic algorithm
static javax.swing.ImageIcon scaleImageBicubic(java.awt.Image image, int width, int height)
          Scales an image with Bicubic algorithm.
static java.awt.image.BufferedImage toBufferedImage(java.awt.Image img)
          Gets a BufferedImage from an Image object.
 
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

resize

public static javax.swing.ImageIcon resize(javax.swing.ImageIcon image,
                                           int width,
                                           int height)
Resizes an ImageIcon object. If any size is -1 returns image with no modification

Parameters:
image - the image
width - the width
height - the height
Returns:
the image icon

resizeImage

public static javax.swing.ImageIcon resizeImage(java.awt.Image img,
                                                int width,
                                                int height)
Resizes an image with Bicubic algorithm

Parameters:
image - the image
width - the width
height - the height
Returns:
the buffered image

scaleImageBicubic

public static javax.swing.ImageIcon scaleImageBicubic(java.awt.Image image,
                                                      int width,
                                                      int height)
Scales an image with Bicubic algorithm.

Parameters:
image - the image
width - the width
height - the height
Returns:
the image icon

toBufferedImage

public static java.awt.image.BufferedImage toBufferedImage(java.awt.Image img)
Gets a BufferedImage from an Image object.

Parameters:
image - the image
Returns:
the buffered image


Copyright © 2006-2008 The aTunes Team. All Rights Reserved.