uk.co.silentsoftware.core.helpers
Class ImageHelper

java.lang.Object
  extended by uk.co.silentsoftware.core.helpers.ImageHelper

public final class ImageHelper
extends java.lang.Object

Helper class for basic image manipulation


Constructor Summary
private ImageHelper()
          Private constructor since we want static use only
 
Method Summary
static java.awt.image.BufferedImage copyImage(java.awt.Image source)
          Convenience method for copying an image without passing in an image to copy to.
static void copyImage(java.awt.Image source, java.awt.image.BufferedImage dest)
          Pixel for pixel copy of an image
static void copyImage(java.awt.Image source, java.awt.image.BufferedImage dest, java.awt.Point p)
          Pixel for pixel copy of an image
static java.awt.image.BufferedImage quickScaleImage(java.awt.image.BufferedImage img, int width, int height)
          Scale an image to a given width and height
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageHelper

private ImageHelper()
Private constructor since we want static use only

Method Detail

quickScaleImage

public static java.awt.image.BufferedImage quickScaleImage(java.awt.image.BufferedImage img,
                                                           int width,
                                                           int height)
Scale an image to a given width and height

Parameters:
img -
width -
height -
Returns:

copyImage

public static java.awt.image.BufferedImage copyImage(java.awt.Image source)
Convenience method for copying an image without passing in an image to copy to.

Parameters:
source -
Returns:

copyImage

public static void copyImage(java.awt.Image source,
                             java.awt.image.BufferedImage dest)
Pixel for pixel copy of an image

Parameters:
source -
dest -

copyImage

public static void copyImage(java.awt.Image source,
                             java.awt.image.BufferedImage dest,
                             java.awt.Point p)
Pixel for pixel copy of an image

Parameters:
source -
dest -