public class ImageUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static Color |
TRANSPARENT |
| Constructor and Description |
|---|
ImageUtils() |
| Modifier and Type | Method and Description |
|---|---|
static BufferedImage |
addBorder(BufferedImage image,
Color borderColor,
int borderWidth,
int cornerRadius) |
static BufferedImage |
base64Decode(File file) |
static BufferedImage |
base64Decode(String encoded) |
static String |
base64Encode(BufferedImage image) |
static String |
base64Encode(File file) |
static BufferedImage |
cropImage(BufferedImage image,
int trimLeft,
int trimRight,
int trimTop,
int trimBottom) |
static BufferedImage |
drawHighlightOval(BufferedImage image,
int x,
int y,
int w,
int h,
Color borderColor,
int borderWidth,
Color innerFillColor) |
static BufferedImage |
drawHighlightRectangle(BufferedImage image,
int x,
int y,
int w,
int h,
Color borderColor,
int borderWidth,
int cornerRadius,
Color innerFillColor) |
static BufferedImage |
drawOval(BufferedImage image,
int x,
int y,
int w,
int h,
Color borderColor,
int borderWidth,
float[] dash,
float dashPhase) |
static BufferedImage |
drawRectangle(BufferedImage image,
int x,
int y,
int w,
int h,
Color borderColor,
int borderWidth,
int cornerRadius) |
static BufferedImage |
drawRectangle(BufferedImage image,
int x,
int y,
int w,
int h,
Color borderColor,
int borderWidth,
int cornerRadius,
float[] dash,
float dashPhase) |
static byte[] |
getImageBytes(BufferedImage image) |
static Image |
getImageFromClipboard() |
static Image |
getImageFromTransferable(Transferable transferable) |
static boolean |
isEncodedImage(String encoded) |
static boolean |
isPossiblyEncodedImage(String encoded) |
static BufferedImage |
loadImageFromFile(File cachedImageFile) |
static BufferedImage |
loadImageFromURL(String imageURL) |
static BufferedImage |
loadImageFromURL(String imageURL,
boolean logImageProcessing) |
static BufferedImage |
makeRoundedCorner(BufferedImage image,
int cornerRadius,
int borderWidth) |
static BufferedImage |
punchOuterHighlightOval(BufferedImage image,
BufferedImage outerImage,
int x,
int y,
int w,
int h,
int borderWidth,
Color outerFillColor,
int outerBorderWidth,
int outerCornerRadius,
boolean applyToImage) |
static BufferedImage |
punchOuterHighlightRectangle(BufferedImage image,
BufferedImage outerImage,
int x,
int y,
int w,
int h,
int borderWidth,
int cornerRadius,
Color outerFillColor,
int outerBorderWidth,
int outerCornerRadius,
boolean applyToImage) |
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 Color TRANSPARENT
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 String base64Encode(BufferedImage image)
public static BufferedImage base64Decode(File file)
public static boolean isEncodedImage(String encoded)
public static boolean isPossiblyEncodedImage(String encoded)
public static BufferedImage base64Decode(String encoded)
public static BufferedImage loadImageFromURL(String imageURL)
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 drawRectangle(BufferedImage image, int x, int y, int w, int h, Color borderColor, int borderWidth, int cornerRadius, float[] dash, float dashPhase)
public static BufferedImage drawOval(BufferedImage image, int x, int y, int w, int h, Color borderColor, int borderWidth, float[] dash, float dashPhase)
public static BufferedImage drawHighlightRectangle(BufferedImage image, int x, int y, int w, int h, Color borderColor, int borderWidth, int cornerRadius, Color innerFillColor)
public static BufferedImage drawHighlightOval(BufferedImage image, int x, int y, int w, int h, Color borderColor, int borderWidth, Color innerFillColor)
public static BufferedImage punchOuterHighlightRectangle(BufferedImage image, BufferedImage outerImage, int x, int y, int w, int h, int borderWidth, int cornerRadius, Color outerFillColor, int outerBorderWidth, int outerCornerRadius, boolean applyToImage)
public static BufferedImage punchOuterHighlightOval(BufferedImage image, BufferedImage outerImage, int x, int y, int w, int h, int borderWidth, Color outerFillColor, int outerBorderWidth, int outerCornerRadius, boolean applyToImage)
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 © 2019. All rights reserved.