Link

Image processing in Java

JDeli is able to process image files or images in memory. Multiple processing operations can be applied together with the convert or process methods.

Process an image file

JDeli.convert(File inputFile, File outputFile, 
ImageProcessingOperations operations);

JDeli can also convert between different image file formats at the same time.

View Javadocs on JDeli.convert

Process a BufferedImage

image = JDeli.process(ImageProcessingOperations operations, 
BufferedImage image);

View Javadocs on JDeli.process

Alphabetical list of Processing operations

ImageProcessingOptions class

This class provides multiple image processing operations and an interface to add your own custom operations. Multiple operations can be added and will execute in that order.

Create an instance and pass into the JDeli process or convert methods.

Example 1 - Create a set of processing operations

ImageProcessingOperations operations = new ImageProcessingOperations();
operations.scale(1f);
operations.custom(new MyCustomProcess());
operations.rotate(90); //units are degrees

Example 2 - Chain a set of processing operations

ImageProcessingOperations operations = new ImageProcessingOperations()
.scale(1f)
.custom(new MyCustomProcess())
.rotate(90);

Example 3 - Implement a custom operation

private class MyCustomImageOperation implements ImageOperation {

    private Object myArgs;

    public MyCustomImageOperations(Object myArgs) {

        this.myArgs = myArgs;
    }

    @Override
    public BufferedImage apply(BufferedImage image) {

        //process code here
        return image;
    }
}

ImageProcessingOperations operations = 
new ImageProcessingOperations(new MyCustomImageOperation(myArgs));

View Javadocs on process package