类 ImageUtil
- java.lang.Object
-
- xin.manong.weapon.base.util.ImageUtil
-
public class ImageUtil extends Object
图片工具- 作者:
- frankcl
-
-
构造器概要
构造器 构造器 说明 ImageUtil()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static ImageMetagetImageMeta(byte[] byteArray)获取图片信息static booleanisAnimatedImage(byte[] byteArray)判断是否为动画图片 判断标准:1.static BufferedImageread(byte[] byteArray)读取图片
-
-
-
方法详细资料
-
isAnimatedImage
public static boolean isAnimatedImage(byte[] byteArray)
判断是否为动画图片 判断标准:1. 图片格式为GIF 2. 包含多张图片- 参数:
byteArray- 图片内容- 返回:
- 如果为动画图片返回true,否则返回false
-
getImageMeta
public static ImageMeta getImageMeta(byte[] byteArray)
获取图片信息- 参数:
byteArray- 图片数据- 返回:
- 如果成功返回图片信息,否则返回null
-
read
public static BufferedImage read(byte[] byteArray)
读取图片- 参数:
byteArray- 图片内容- 返回:
- 如果成功返回BufferedImage实例,否则返回null
-
-