rabbit.handler.convert
Class JavaImageConverter

java.lang.Object
  extended by rabbit.handler.convert.JavaImageConverter
All Implemented Interfaces:
ImageConverter

public class JavaImageConverter
extends Object
implements ImageConverter

An image converter that uses javax.image to convert images

Author:
Robert Olofsson

Constructor Summary
JavaImageConverter(SProperties props)
          Create a new JavaImageConverter using the given properties.
 
Method Summary
 boolean canConvert()
          Check if this image converter can do any work.
 void convertImage(File input, File output, String info)
          Convert an image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaImageConverter

public JavaImageConverter(SProperties props)
Create a new JavaImageConverter using the given properties.

Parameters:
props - the properties hodling the configuration
Method Detail

canConvert

public boolean canConvert()
Description copied from interface: ImageConverter
Check if this image converter can do any work.

Specified by:
canConvert in interface ImageConverter
Returns:
true if this image converter can convert.

convertImage

public void convertImage(File input,
                         File output,
                         String info)
                  throws IOException
Description copied from interface: ImageConverter
Convert an image.

Specified by:
convertImage in interface ImageConverter
Parameters:
input - the File that holds the source image
output - the File to store the converted image in
info - some identifier for the image (typically the uri)
Throws:
IOException - if the image conversion fails