Link

Invert colors of an image

This class uses the provided image and returns an inverted image containing negative argb values image. This makes the image appear inverted.

Example 1 - Using Image Processing Operation to invert an image

BufferedImage image = JDeli.read(new File("path\to\file"));
ImageProcessingOperations operations = new ImageProcessingOperations();
operations.invertColors();
image = operations.apply(image);
JDeli.write(image, "OutputFormat",new FileOutputStream("path\to\outputFile"));

Example 2 - Using an Image Processing Operation chain to invert an image

BufferedImage image = JDeli.read(new File("path\to\file"));
ImageProcessingOperations operations = new ImageProcessingOperations();
image = operations.invertColors().apply(image);
JDeli.write(image, "OutputFormat",new FileOutputStream("path\to\outputFile"));