public class ImageUtils extends Object
| Constructor and Description |
|---|
ImageUtils() |
| Modifier and Type | Method and Description |
|---|---|
static BufferedImage |
addBorder(BufferedImage image,
Color borderColor,
int borderWidth,
int cornerRadius) |
static BufferedImage |
cropImage(BufferedImage image,
int trimLeft,
int trimRight,
int trimTop,
int trimBottom) |
static BufferedImage |
drawRectangle(BufferedImage image,
int x,
int y,
int w,
int h,
Color borderColor,
int borderWidth,
int cornerRadius) |
static byte[] |
getImageBytes(BufferedImage image) |
static Image |
getImageFromClipboard() |
static Image |
getImageFromTransferable(Transferable transferable) |
static BufferedImage |
loadImageFromFile(File cachedImageFile) |
static BufferedImage |
loadImageFromURL(String imageURL,
boolean logImageProcessing) |
static BufferedImage |
makeRoundedCorner(BufferedImage image,
int cornerRadius,
int borderWidth) |
static BufferedImage |
removeAlpha(BufferedImage image) |
static void |
save(BufferedImage image,
File file,
String format) |
static BufferedImage |
scaleImage(BufferedImage sourceImage,
int newWidth,
int newHeight,
int opType) |
static BufferedImage |
toBufferedImage(Image src) |
static Image |
toTransparent(BufferedImage image,
Color color,
int tolerance) |
public static Image getImageFromClipboard()
public static Image getImageFromTransferable(Transferable transferable)
public static BufferedImage scaleImage(BufferedImage sourceImage, int newWidth, int newHeight, int opType)
public static BufferedImage toBufferedImage(Image src)
public static void save(BufferedImage image, File file, String format)
public static BufferedImage loadImageFromFile(File cachedImageFile)
cachedImageFile - filenull if the image could not be read from the file (because of whatever strange
reason).public static BufferedImage loadImageFromURL(String imageURL, boolean logImageProcessing)
public static BufferedImage makeRoundedCorner(BufferedImage image, int cornerRadius, int borderWidth)
public static BufferedImage addBorder(BufferedImage image, Color borderColor, int borderWidth, int cornerRadius)
public static BufferedImage drawRectangle(BufferedImage image, int x, int y, int w, int h, Color borderColor, int borderWidth, int cornerRadius)
public static BufferedImage cropImage(BufferedImage image, int trimLeft, int trimRight, int trimTop, int trimBottom)
public static BufferedImage removeAlpha(BufferedImage image)
public static Image toTransparent(BufferedImage image, Color color, int tolerance)
public static byte[] getImageBytes(BufferedImage image)
Copyright © 2018. All rights reserved.