mako5.gfx.j2d
Class JImageUtils

java.lang.Object
  extended by mako5.gfx.j2d.JImageUtils

public final class JImageUtils
extends Object

Used to perform specialized operations upon Java2D image types.

Version:
04-Mar 2006
Author:
Paul Jarrett

Method Summary
static BufferedImage convertToBufferedImage(Image rImage_, int iType_)
          Converts a standard Java image into a buffered image.
static int convertToOpenGL(BufferedImage rImage_)
          Takes the input image and returns an OpenGL image reference to a copied image.
static BufferedImage copyImage(Image rImage_, BufferedImage rDest_)
          Converts a standard Java image into the given buffered image.
static Image load(String rSource_)
          Loads a Java image from the given string file.
static Image load(URL rSource_)
          Loads a Java image from the given file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

load

public static Image load(String rSource_)
Loads a Java image from the given string file.

Parameters:
rSource_ - the location of the image data
Returns:
the image at the given location, or null if the file is corrupt or nonexistent

load

public static Image load(URL rSource_)
Loads a Java image from the given file.

Parameters:
rSource_ - the location of the image data
Returns:
the image at the given location

convertToBufferedImage

public static BufferedImage convertToBufferedImage(Image rImage_,
                                                   int iType_)
Converts a standard Java image into a buffered image.

Parameters:
rImage_ - the input image
iType_ - the type of buffered image to use
Returns:
a buffered image version of the input image

copyImage

public static BufferedImage copyImage(Image rImage_,
                                      BufferedImage rDest_)
Converts a standard Java image into the given buffered image.

Parameters:
rImage_ - the input image
rDest_ - the destination image
Returns:
a buffered image version of the input image

convertToOpenGL

public static int convertToOpenGL(BufferedImage rImage_)
Takes the input image and returns an OpenGL image reference to a copied image. NOTE: Not written by me