org.mmbase.util.images
Class DummyImageConverter

java.lang.Object
  extended by org.mmbase.util.images.DummyImageConverter
All Implemented Interfaces:
ImageConverter

public class DummyImageConverter
extends Object
implements ImageConverter

A 'Dummy' converter for converting images when Imagemagick and JAI are not available. This class simply returns an image unchanged.

Since:
MMBase 1.6.3
Version:
$Id: DummyImageConverter.java 36963 2009-07-15 07:10:58Z michiel $
Author:
Gerard van de Looi

Constructor Summary
DummyImageConverter()
           
 
Method Summary
 byte[] convertImage(byte[] input, String sourceFormat, List<String> commands)
          Call for converting a specified image (byte array) using a list of (string) commands This dummy method ignores any passed commands, and simply returns the inputed list.
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyImageConverter

public DummyImageConverter()
Method Detail

init

public void init(Map<String,String> params)
Specified by:
init in interface ImageConverter
See Also:
ImageConverter.init(Map)

convertImage

public byte[] convertImage(byte[] input,
                           String sourceFormat,
                           List<String> commands)
Call for converting a specified image (byte array) using a list of (string) commands This dummy method ignores any passed commands, and simply returns the inputed list.

Specified by:
convertImage in interface ImageConverter
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.
See Also:
ImageConverter.convertImage(byte[], String, List)

convertImage

public long convertImage(InputStream input,
                         String sourceFormat,
                         OutputStream out,
                         List<String> commands)
                  throws IOException
Description copied from interface: ImageConverter
This functions converts an image by the given parameters

Specified by:
convertImage in interface ImageConverter
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


MMBase 2.0-SNAPSHOT - null