类 ImageUtil


  • public class ImageUtil
    extends Object
    图片工具
    作者:
    frankcl
    • 构造器详细资料

      • ImageUtil

        public ImageUtil()
    • 方法详细资料

      • 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