Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 1.52 KB

File metadata and controls

43 lines (33 loc) · 1.52 KB

Java-BufferedImage-Filters

A library designed to provide users with CPU based graphical filters that can be performed on Java Buffered Images or Buffered Image supported file formats

Using Filters

Process Function:

There are two process functions which are identical for all filters:

BufferedImage /*FILTER_NAME*/ process(boolean newFile);

Prompts the user with a file finder window, allowing them to select the image they wish to process. Once the image has been processed, a new PNG file will be created in the same directory as the orignal image if requested.

and

BufferedImage /*FILTER_NAME*/ process(BufferedImage inputImage, boolean newFile, String filePath);

Requires an input Buffered Image and will create it creates a new PNG file named "Filtered-Image.png" in the provided folder once the image has been processed if requested

Combining Filters:

Process functions can be nested to combine filters. Example:

Grayscale gs = new Grayscale();
Dither di = new Dither();
di.process(gs.process(false), true, "C:/Path/to/folder/");

will create a png image called "Dithered.png" in the folder provided.

Example Filters

Base Image:

Floyd–Steinberg dithering:

The example above is created with a dithering mod value of 2

Floyd–Steinberg dithering + Grayscale:

resulting image from the sample code in Combining Filters