imageprocessing
Interface IImageProcessor


public interface IImageProcessor

A controller which can read and write image files, and otherwise process and transform images.


Method Summary
 IImage produceImage(String fileID)
          Load an image from a file.
 IImage produceTimesTwo(IImage image)
          Produce an image that returns an image identical to the given iaage but twice the size.
 boolean writeImage(IImage image, String fileID)
          Write an image to a file.
 

Method Detail

produceImage

public IImage produceImage(String fileID)
Load an image from a file.

Parameters:
fileID - the name of a file containing an image. An appropriate response is required if the file is invalid.
Returns:
the image, or null if the image cannot be loaded.

writeImage

public boolean writeImage(IImage image,
                          String fileID)
Write an image to a file.

Parameters:
image - an image
fileID - the name of a file where the image is to be written.
Returns:
true if the operation succeeds, false otherwise

produceTimesTwo

public IImage produceTimesTwo(IImage image)
Produce an image that returns an image identical to the given iaage but twice the size. That is, it scales the image by 2x. The original image is not modified.

Parameters:
image - a non-null image.
Returns:
an image twice the size of the original, or null if the operation cannot be performed.