org.mmbase.module.builders
Class ConvertImageMagick

java.lang.Object
  |
  +--org.mmbase.module.builders.ConvertImageMagick
All Implemented Interfaces:
ImageConvertInterface

public class ConvertImageMagick
extends java.lang.Object
implements ImageConvertInterface

Converts images using ImageMagick.

Version:
$Id: ConvertImageMagick.java,v 1.42.2.4 2003/05/12 11:05:41 nico Exp $
Author:
Rico Jansen, Michiel Meeuwissen, Nico Klasens

Field Summary
protected  java.lang.String defaultImageFormat
          The default image format.
 
Constructor Summary
ConvertImageMagick()
           
 
Method Summary
protected  java.lang.String color(java.lang.String c)
          Translates MMBase color format (without #) to an convert color format (with or without);
 byte[] convertImage(byte[] input, java.util.List commands)
          This functions converts an image by the given parameters
 byte[] ConvertImage(byte[] input, java.util.List commands)
          Deprecated. Use convertImage
protected  java.lang.String getAlias(java.lang.String a)
          MMBase has some abreviations to convert commands, like 's' for 'geometry'.
 void init(java.util.Map params)
          This function initalises this class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultImageFormat

protected java.lang.String defaultImageFormat
The default image format.
Constructor Detail

ConvertImageMagick

public ConvertImageMagick()
Method Detail

init

public void init(java.util.Map params)
This function initalises this class
Specified by:
init in interface ImageConvertInterface
Parameters:
params - a Map of Strings containing informationn, this should contina the key's ImageConvert.ConverterRoot and ImageConvert.ConverterCommand specifing the converter root....

convertImage

public byte[] convertImage(byte[] input,
                           java.util.List commands)
This functions converts an image by the given parameters
Specified by:
convertImage in interface ImageConvertInterface
Parameters:
input - an array of byte which represents the original image
commands - a List of Strings containing commands which are operations on the image which will be returned. ImageConvert.converterRoot and ImageConvert.converterCommand specifing the converter root....
Returns:
an array of bytes containing the new converted image.

ConvertImage

public byte[] ConvertImage(byte[] input,
                           java.util.List commands)
Deprecated. Use convertImage

Specified by:
ConvertImage in interface ImageConvertInterface

color

protected java.lang.String color(java.lang.String c)
Translates MMBase color format (without #) to an convert color format (with or without);

getAlias

protected java.lang.String getAlias(java.lang.String a)
MMBase has some abreviations to convert commands, like 's' for 'geometry'. These are treated here.
Parameters:
a - alias
Returns:
actual convert parameter name for alias.


MMBase build 1.6.5.20030923