com.golden.gamedev.util
Class ImageUtil

java.lang.Object
  |
  +--com.golden.gamedev.util.ImageUtil

public class ImageUtil
extends Object

Utility class for loading images.


Method Summary
static BufferedImage applyMask(Image img, Color keyColor)
           
static BufferedImage createImage(int width, int height)
           
static BufferedImage createImage(int width, int height, int transparency)
           
static BufferedImage getImage(URL url)
           
static BufferedImage getImage(URL url, Color keyColor)
           
static BufferedImage getImage(URL url, int transparency)
           
static BufferedImage[] getImages(URL url, int col, int row)
           
static BufferedImage[] getImages(URL url, int col, int row, Color keyColor)
           
static BufferedImage[] getImages(URL url, int col, int row, int transparency)
           
static BufferedImage resize(BufferedImage src, double rsx, double rsy)
           
static BufferedImage rotate(BufferedImage src, int angle)
           
static void saveImage(BufferedImage image, File imagefile)
           
static void saveImage(BufferedImage image, String imagefile)
           
static BufferedImage[] splitImages(BufferedImage image, int col, int row)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getImage

public static BufferedImage getImage(URL url,
                                     int transparency)

getImage

public static BufferedImage getImage(URL url)

getImage

public static BufferedImage getImage(URL url,
                                     Color keyColor)

getImages

public static BufferedImage[] getImages(URL url,
                                        int col,
                                        int row)

getImages

public static BufferedImage[] getImages(URL url,
                                        int col,
                                        int row,
                                        Color keyColor)

getImages

public static BufferedImage[] getImages(URL url,
                                        int col,
                                        int row,
                                        int transparency)

createImage

public static BufferedImage createImage(int width,
                                        int height,
                                        int transparency)

createImage

public static BufferedImage createImage(int width,
                                        int height)

applyMask

public static BufferedImage applyMask(Image img,
                                      Color keyColor)

splitImages

public static BufferedImage[] splitImages(BufferedImage image,
                                          int col,
                                          int row)

saveImage

public static void saveImage(BufferedImage image,
                             File imagefile)

saveImage

public static void saveImage(BufferedImage image,
                             String imagefile)

rotate

public static BufferedImage rotate(BufferedImage src,
                                   int angle)

resize

public static BufferedImage resize(BufferedImage src,
                                   double rsx,
                                   double rsy)