jwo.utils.gui
Interface ImageHandler

All Known Implementing Classes:
BMPHandler, GIFHandler, JPGHandler, PNGHandler

public interface ImageHandler

Defines the behaviour of all image handlers. An image handler should be able to write a given image data as a file.

Version:
2.3, 10th August, 2003.
Author:
Jo Wood

Method Summary
 boolean saveImage(String fileName, byte[] imageArray, int imgWidth, int imgHeight)
          Should save the given array of 24 bit colours as a file with the given name and dimensions.
 boolean saveImage(String fileName, Image image)
          Should save the given image as a file with the given name.
 

Method Detail

saveImage

boolean saveImage(String fileName,
                  Image image)
Should save the given image as a file with the given name.

Parameters:
fileName - Name of image file to save.
image - Image to save.
Returns:
True if saved correctly, or false if problems saving.

saveImage

boolean saveImage(String fileName,
                  byte[] imageArray,
                  int imgWidth,
                  int imgHeight)
Should save the given array of 24 bit colours as a file with the given name and dimensions.

Parameters:
fileName - Name of image file to save.
imageArray - BGR colours stored in byte array (3 bytes per colour).
imgWidth - Width of image to save.
imgHeight - Height of image to save.
Returns:
True if saved correctly, or false if problems saving.


Copyright Jo Wood, 1996-2009, last modified, 17th April, 2009