public class ImageProcessor extends Object
| Constructor and Description |
|---|
ImageProcessor() |
| Modifier and Type | Method and Description |
|---|---|
static BufferedImage |
addText(BufferedImage sourceImage,
int x,
int y,
String text,
Color color,
Font font) |
static BufferedImage |
addTitle(BufferedImage sourceImage,
String title,
Color color,
Font textFont) |
static BufferedImage |
blur(BufferedImage sourceImage) |
static BufferedImage |
blurArea(BufferedImage sourceImage,
Coordinates coords) |
static BufferedImage |
blurExceptArea(BufferedImage sourceImage,
Coordinates coords) |
static BufferedImage |
convertToGrayAndWhite(BufferedImage sourceImage) |
static BufferedImage |
createImageFromBytes(byte[] imageData) |
static BufferedImage |
cropAndScale(BufferedImage source,
double ratio,
double cropWidth,
double cropHeight) |
static BufferedImage |
cropAndScale(BufferedImage source,
double ratio,
int maxWidth,
int maxHeight) |
static BufferedImage |
cropAround(BufferedImage sourceImage,
Coordinates coords,
int offsetX,
int offsetY) |
static BufferedImage |
getElement(BufferedImage sourceImage,
Coordinates coords) |
static boolean |
hasAlpha(Image image) |
static BufferedImage |
highlight(BufferedImage sourceImage,
Coordinates coords,
Color color,
int lineWidth) |
static boolean |
imagesAreEquals(BufferedImage image1,
BufferedImage image2,
double deviation) |
static boolean |
imagesAreEqualsWithDiff(BufferedImage image1,
BufferedImage image2,
String pathFileName,
double deviation)
Extends the functionality of imagesAreEqualsWithDiff, but creates a third BufferedImage and applies pixel manipulation to it.
|
static BufferedImage |
monochromeArea(BufferedImage sourceImage,
Coordinates coords) |
static BufferedImage |
scale(BufferedImage source,
double ratio) |
public static BufferedImage blur(BufferedImage sourceImage)
public static BufferedImage highlight(BufferedImage sourceImage, Coordinates coords, Color color, int lineWidth)
public static BufferedImage addText(BufferedImage sourceImage, int x, int y, String text, Color color, Font font)
public static BufferedImage getElement(BufferedImage sourceImage, Coordinates coords)
public static BufferedImage blurArea(BufferedImage sourceImage, Coordinates coords)
public static BufferedImage monochromeArea(BufferedImage sourceImage, Coordinates coords)
public static BufferedImage blurExceptArea(BufferedImage sourceImage, Coordinates coords)
public static BufferedImage cropAround(BufferedImage sourceImage, Coordinates coords, int offsetX, int offsetY)
public static BufferedImage addTitle(BufferedImage sourceImage, String title, Color color, Font textFont)
public static BufferedImage convertToGrayAndWhite(BufferedImage sourceImage)
public static boolean imagesAreEquals(BufferedImage image1, BufferedImage image2, double deviation)
public static boolean imagesAreEqualsWithDiff(BufferedImage image1, BufferedImage image2, String pathFileName, double deviation)
image1 - The first image to compareimage2 - The second image to comparepathFileName - The output path filename for the third image, if null then is ignoreddeviation - The upper limit of the pixel deviation for the testpublic static BufferedImage scale(BufferedImage source, double ratio)
public static BufferedImage cropAndScale(BufferedImage source, double ratio, double cropWidth, double cropHeight)
public static BufferedImage cropAndScale(BufferedImage source, double ratio, int maxWidth, int maxHeight)
public static boolean hasAlpha(Image image)
public static BufferedImage createImageFromBytes(byte[] imageData)
Copyright © 2020. All rights reserved.