Class Im4javaImageTool
- java.lang.Object
-
- org.silverpeas.core.io.media.image.AbstractImageTool
-
- org.silverpeas.core.io.media.image.imagemagick.Im4javaImageTool
-
- All Implemented Interfaces:
ImageTool
@Service public class Im4javaImageTool extends AbstractImageTool
- Author:
- Yohann Chastagnier
-
-
Constructor Summary
Constructors Constructor Description Im4javaImageTool()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconvert(File source, File destination, Map<Class<AbstractImageToolOption>,AbstractImageToolOption> options, Set<ImageToolDirective> directives)Convert an image with dimensions and options directivesString[]getImageInfo(File source, ImageInfoType... infoTypes)Gets aimed information from the given image file.booleanisActivated()Indicates if image tools are available-
Methods inherited from class org.silverpeas.core.io.media.image.AbstractImageTool
convert, convert, convert, getOption
-
-
-
-
Method Detail
-
isActivated
public boolean isActivated()
Description copied from interface:ImageToolIndicates if image tools are available- Returns:
-
getImageInfo
public String[] getImageInfo(File source, ImageInfoType... infoTypes) throws org.silverpeas.kernel.SilverpeasException
Description copied from interface:ImageToolGets aimed information from the given image file.- Parameters:
source- the image file.infoTypes- the aimed types of info.- Returns:
- Throws:
org.silverpeas.kernel.SilverpeasException
-
convert
protected void convert(File source, File destination, Map<Class<AbstractImageToolOption>,AbstractImageToolOption> options, Set<ImageToolDirective> directives) throws org.silverpeas.kernel.SilverpeasException
Description copied from class:AbstractImageToolConvert an image with dimensions and options directives- Specified by:
convertin classAbstractImageTool- 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 sourceoptions- permits specifying multiple additional working options : - DIMENSION : resizing the image - BACKGROUND : setting a background colordirectives- it is possible to specify some additional directives : - PREVIEW_WORK : the conversion concerns an preview result - GEOMETRY_SHRINK : shrinks images with dimension(s)- Throws:
org.silverpeas.kernel.SilverpeasException
-
-