public class ImageUtil extends Object
| 构造器和说明 |
|---|
ImageUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
appendSuffixHyphenThumbnail(String fileName)
Description:
<添加文件后缀>
|
static InputStream |
buildThumbnail(InputStream inputStream,
String suffix)
获取文件缩略图
|
static Rectangle |
calcRotatedSize(Rectangle src,
int angel) |
static Double |
getRotate(BufferedInputStream inputStream) |
static boolean |
isImage(File srcFilePath)
Description:
<判别文件是否为图片>
|
static boolean |
isImage(InputStream bis)
判断文件流是否是图片
|
static boolean |
isImage(String suffix)
快速判断是否图片
|
static BufferedImage |
rotateImage(BufferedImage bufferedimage,
int degree)
将图片旋转指定度
|
public static boolean isImage(File srcFilePath)
srcFilePath - 文件对象public static Double getRotate(BufferedInputStream inputStream)
public static boolean isImage(String suffix)
suffix - 文件后缀public static InputStream buildThumbnail(InputStream inputStream, String suffix)
inputStream - 原图片流public static String appendSuffixHyphenThumbnail(String fileName)
fileName - 文件名(可以包含路径)public static boolean isImage(InputStream bis)
bis - bispublic static BufferedImage rotateImage(BufferedImage bufferedimage, int degree)
bufferedimage - 原图degree - 角度Copyright © 2023. All rights reserved.