如何在java中阅读ico格式图片? [英] How to read an ico format picture in java?

查看:190
本文介绍了如何在java中阅读ico格式图片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有很多.ico格式的图片,我想在我的Java SE项目中使用它们,但它不知道格式。我该如何解决这个问题?

I have a lot of .ico formatted pictures, and I want to use them in my Java SE project, but it doesn't know the format. How can I work around this?

推荐答案

试试 image4j - 用于Java的图像库


image4j库允许您读写某些图像格式
100%纯Java。

The image4j library allows you to read and write certain image formats in 100% pure Java.

目前支持以下格式:


  • BMP(Microsoft位图格式 - 未压缩; 1,4,8,24和32位)

  • ICO(Microsoft图标格式 - 1,4,8,24和32位[XP未压缩,
    Vista压缩])

使用该库,您可以轻松解码你的ico文件

With the library you can easily decode your ico file

List<BufferedImage> image = ICODecoder.read(new File("input.ico"));

这篇关于如何在java中阅读ico格式图片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆