Class ImageStorage

java.lang.Object
  extended by ImageStorage

public class ImageStorage
extends java.lang.Object

A utility class that can be used to load images from files and save images to files.


Constructor Summary
ImageStorage()
           
 
Method Summary
static java.awt.Color[][] loadImage(java.lang.String name)
          Load an image from a file
static void saveImage(java.awt.Color[][] pixels, java.lang.String name)
          Save an image to a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageStorage

public ImageStorage()
Method Detail

loadImage

public static java.awt.Color[][] loadImage(java.lang.String name)
Load an image from a file

Parameters:
name - The name of the file
Returns:
The image (i.e., the two-dimensional array of pixels)

saveImage

public static void saveImage(java.awt.Color[][] pixels,
                             java.lang.String name)
                      throws java.io.IOException
Save an image to a file

Parameters:
pixels - The image (i.e., the two-dimensional array of pixels)
name - The name of the file
Throws:
java.io.IOException


PerspecTV