Simple, Easy to use Java image processing utilities for common tasks like resizing, blurring.
Use the lastest version from Maven Central
BufferedImage sourceImage = .......; //load or create your own BufferedImage object
ImageResizer imageResizer = new JavaImageResizer(); //choose a resizer that implements ImageResizer
//resize source image within max width and max height, the aspect ratio will not be changed
BufferedImage resultImage2 = imageResizer.resizeWithin(sourceImage, 100,100);
//resize source image to target width and height and return the resized one (Caution: source image will be scaled to fit)
BufferedImage resultImage = imageResizer.resize(sourceImage, 100,200);
- JavaImageResizer: pure java resizer without third party dependencies
BufferedImage sourceImage = .......; //load or create your own BufferedImage object
ImageFilter filter = new JavaImageFilter(); //choose a filter that implements ImageFilter
//blur image, choose a Kernal
Kernel customKernel = new GeneralKernelMaker().make(); //using custom kernel
BufferedImage resultImage = filter.blur(sourceImage, customKernel);
- JavaImageFilter: pure java filter without third party dependencies
- blur: blur image using Kernel
- GeneralKernelMaker: kernel maker supporting custom matrix (a default 3*3 will be used if not provided)
- EmbossKernelMaker: used for embossing an image