public class ImageUtil extends Object
| 构造器和说明 |
|---|
ImageUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static BufferedImage |
makeRoundedCornerImg(BufferedImage image,
int cornerRadius) |
static BufferedImage |
makeRoundedCornerImg(String sfile,
int cornerRadius) |
static BufferedImage |
resizeImg(Image image,
int newWidth,
int newHeight,
float quality)
重新设置图像大小
|
static BufferedImage |
resizeImg(String sfile,
int newWidth,
int newHeight,
float quality)
重新设置图像大小
|
static void |
write(BufferedImage image,
String tfile) |
public static BufferedImage resizeImg(String sfile, int newWidth, int newHeight, float quality) throws IOException
sfile - 图片源文件newWidth - 新宽度newHeight - 新高度quality - 质量系数IOException - 抛出异常public static BufferedImage resizeImg(Image image, int newWidth, int newHeight, float quality) throws IOException
image - 文件newWidth - 新宽度newHeight - 新高度quality - 质量系数IOException - 抛出异常public static BufferedImage makeRoundedCornerImg(String sfile, int cornerRadius) throws IOException
sfile - 图片源文件cornerRadius - 圆角90/180/360IOException - 抛出异常public static BufferedImage makeRoundedCornerImg(BufferedImage image, int cornerRadius) throws IOException
image - 文件cornerRadius - 圆角90/180/360IOException - 抛出异常public static void write(BufferedImage image, String tfile) throws IOException
image - 文件tfile - 写入本地文件路径IOException - 抛出异常Copyright © 2018 Pivotal Software, Inc.. All rights reserved.