How to read ico format image in java?

I have many images in .ico format and I want to use them in my Java SE project, but he does not know the format. How can I get around this?

+5
source share
2 answers

Try image4j - Image Library for Java

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

The following formats are currently supported:

  • BMP (Microsoft Raster Image Format - Uncompressed, 1, 4, 8, 24, and 32 bits)
  • ICO (Microsoft icon format is 1, 4, 8, 24, and 32 bits [XP uncompressed, Vista compressed])

Using the library you can easily decode your ico file

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

Apache Commons Imaging ICO :

    List<BufferedImage> images = Imaging.getAllBufferedImages(new File("input.ico"));

(EXIF, IPTC XMP).

TwelveMonkeys ImageIO API ImageIO ICO .

+2