Class AbstractImageTool
- java.lang.Object
-
- org.silverpeas.core.io.media.image.AbstractImageTool
-
- All Implemented Interfaces:
ImageTool
- Direct Known Subclasses:
Im4javaImageTool
public abstract class AbstractImageTool extends Object implements ImageTool
- Author:
- Yohann Chastagnier
-
-
Constructor Summary
Constructors Constructor Description AbstractImageTool()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
convert(File source, File destination, Map<Class<AbstractImageToolOption>,AbstractImageToolOption> options, Set<ImageToolDirective> directives)
Convert an image with dimensions and options directivesvoid
convert(File source, File destination, Set<AbstractImageToolOption> options, ImageToolDirective... directives)
Converts and resizes an image with dimensions and directivesvoid
convert(File source, File destination, ImageToolDirective... directives)
Converts an image with some directivesvoid
convert(File source, File destination, AbstractImageToolOption option, ImageToolDirective... directives)
Converts and resizes an image with dimensions and directivesprotected <T extends AbstractImageToolOption>
TgetOption(Map<?,?> options, Class<T> key)
Option getter tool-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.io.media.image.ImageTool
getImageInfo, isActivated
-
-
-
-
Method Detail
-
convert
protected abstract void convert(File source, File destination, Map<Class<AbstractImageToolOption>,AbstractImageToolOption> options, Set<ImageToolDirective> directives) throws org.silverpeas.kernel.SilverpeasException
Convert an image with dimensions and options directives- 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
-
convert
public void convert(File source, File destination, ImageToolDirective... directives)
Description copied from interface:ImageTool
Converts an image with some directives
-
convert
public void convert(File source, File destination, AbstractImageToolOption option, ImageToolDirective... directives)
Description copied from interface:ImageTool
Converts and resizes an image with dimensions and directives
-
convert
public void convert(File source, File destination, Set<AbstractImageToolOption> options, ImageToolDirective... directives)
Description copied from interface:ImageTool
Converts and resizes an image with dimensions and directives
-
getOption
protected <T extends AbstractImageToolOption> T getOption(Map<?,?> options, Class<T> key)
Option getter tool- Parameters:
options
-key
-- Returns:
-
-