org.mmbase.util.images
Interface ImageConverter

All Known Implementing Classes:
AbstractImageConverter, DummyImageConverter, ImageMagickImageConverter, JAIImageConverter

public interface ImageConverter

Interface for classes that can convert images.

Author:
Rico Jansen, Michiel Meeuwissen

Method Summary
 byte[] convertImage(byte[] input, String sourceFormat, List<String> commands)
          This functions converts an image by the given parameters
 long convertImage(InputStream input, String sourceFormat, OutputStream out, List<String> commands)
          This functions converts an image by the given parameters
 void init(Map<String,String> params)
           
 

Method Detail

init

void init(Map<String,String> params)

convertImage

byte[] convertImage(byte[] input,
                    String sourceFormat,
                    List<String> commands)
This functions converts an image by the given parameters

Parameters:
input - an array of byte which represents the original image
sourceFormat - original image format
commands - a List of Strings containing commands which are operations on the image which will be returned.
Returns:
an array of bytes containing the new converted image.

convertImage

long convertImage(InputStream input,
                  String sourceFormat,
                  OutputStream out,
                  List<String> commands)
                  throws IOException
This functions converts an image by the given parameters

Parameters:
input - stream of byte which represents the original image
sourceFormat - original image format
out - stream of bytes containing the new converted image.
commands - a List of Strings containing commands which are operations on the image which will be returned.
Returns:
number of bytes of converted image.
Throws:
IOException - When an error occurs when converting the image
Since:
MMBase-1.9


MMBase 2.0-SNAPSHOT - null