org.silverpeas.image.imagemagick
Class Im4javaImageTool

java.lang.Object
  extended by org.silverpeas.image.AbstractImageTool
      extended by org.silverpeas.image.imagemagick.Im4javaImageTool
All Implemented Interfaces:
ImageTool

@Named(value="imageTool")
public class Im4javaImageTool
extends AbstractImageTool

Author:
Yohann Chastagnier

Constructor Summary
Im4javaImageTool()
           
 
Method Summary
protected  void convert(File source, File destination, Map<Class<AbstractImageToolOption>,AbstractImageToolOption> options, Set<ImageToolDirective> directives)
          Convert an image with dimensions and options directives
 boolean isActivated()
          Indicates if image tools are available
 
Methods inherited from class org.silverpeas.image.AbstractImageTool
convert, convert, convert, getOption
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Im4javaImageTool

public Im4javaImageTool()
Method Detail

isActivated

public boolean isActivated()
Description copied from interface: ImageTool
Indicates if image tools are available

Returns:

convert

protected void convert(File source,
                       File destination,
                       Map<Class<AbstractImageToolOption>,AbstractImageToolOption> options,
                       Set<ImageToolDirective> directives)
                throws Exception
Description copied from class: AbstractImageTool
Convert an image with dimensions and options directives

Specified by:
convert in class AbstractImageTool
Parameters:
source - mandatory (if it not exists, no exception is generated and the process stops)
destination - if destination is not specified, the destination file is the same as the source
options - permits specifying multiple additional working options : - DIMENSION : resizing the image - BACKGROUND : setting a background color
directives - it is possible to specify some additional directives : - PREVIEW_WORK : the conversion concerns an preview result - GEOMETRY_SHRINK : shrinks images with dimension(s) larger than the corresponding width and/or height dimension(s).
Throws:
Exception


Copyright © 2016 Silverpeas. All Rights Reserved.