Class AbstractImageTool

    • Constructor Detail

      • AbstractImageTool

        public AbstractImageTool()
    • 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 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)
        Throws:
        org.silverpeas.kernel.SilverpeasException
      • getOption

        protected <T extends AbstractImageToolOption> T getOption​(Map<?,​?> options,
                                                                  Class<T> key)
        Option getter tool
        Parameters:
        options -
        key -
        Returns: