Interface IElFinderImageProcessor

  • All Superinterfaces:
    Serializable

    public interface IElFinderImageProcessor
    extends Serializable
    Handler handles image processing operations for the elFinder connector, when the resize command is used to modify images, such as by scaling or rotating them. See also Client-Server-API-2.1#resize
    Since:
    8.3.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • cropImage

        void cropImage​(Path source,
                       Path target,
                       IElFinderImageProcessorCropParams params)
                throws IOException
        Crops an image to the specified rectangular crop box. If part of the crop box lies outside the image, the crop box should be clipped to the image boundaries. The width and height are always greater than zero.
        Parameters:
        source - The path to the source image to crop.
        target - The target path to save the cropped image to.
        params - The parameters for the crop operation.
        Throws:
        IOException - If an I/O error occurs.
      • rotateImage

        void rotateImage​(Path source,
                         Path target,
                         IElFinderImageProcessorRotateParams params)
                  throws IOException
        Rotates an image by the specified number of degrees. The rotation is performed clockwise.
        Parameters:
        source - The path to the source image to rotate.
        target - The target path to save the rotated image to.
        params - The parameters for the rotate operation.
        Throws:
        IOException - If an I/O error occurs.
      • scaleImage

        void scaleImage​(Path source,
                        Path target,
                        IElFinderImageProcessorScaleParams params)
                 throws IOException
        Scales an image vertically and horizontally to the specified size. The width and height are always greater than zero. The aspect ratio of the image is changed if the target width and height do not match the original aspect ratio.
        Parameters:
        source - The path to the source image to scale.
        target - The target path to save the scaled image to.
        params - The parameters for the scale operation.
        Throws:
        IOException - If an I/O error occurs.