org.mmbase.util.images
Class DummyImageConverter
java.lang.Object
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 44572 2011-01-06 08:56:39Z michiel $
- Author:
- Gerard van de Looi
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DummyImageConverter
public DummyImageConverter()
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 imagesourceFormat - original image formatcommands - 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 imagesourceFormat - original image formatout - 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
MMBase2 Resources 2.0-SNAPSHOT - 2013-03-30T06:37