https://github.com/qurben/jico
JICO - Parse ico in Java
https://github.com/qurben/jico
awt awt-graphics ico icon icons java swing
Last synced: 5 months ago
JSON representation
JICO - Parse ico in Java
- Host: GitHub
- URL: https://github.com/qurben/jico
- Owner: qurben
- License: apache-2.0
- Created: 2021-12-02T10:15:15.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-02T19:56:44.000Z (over 1 year ago)
- Last Synced: 2025-07-18T20:09:43.884Z (11 months ago)
- Topics: awt, awt-graphics, ico, icon, icons, java, swing
- Language: Java
- Homepage:
- Size: 62.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# JICO
[](https://github.com/qurben/jico/actions/workflows/maven.yml)
[](https://search.maven.org/search?q=g:%22io.github.qurben%22%20AND%20a:%22jico%22)
A tiny library to read .ico files in java. Uses `ImageIO` to parse the contained png and bmp files. This package is only about **11KB** and focuses only on loading .ico images.
The .ico parser is based on code from [`org.apache.commons:commons-imaging`](https://github.com/apache/commons-imaging).
## Download
You can download binaries from the releases page.
Alternatively you can pull it from the central Maven repositories:
```xml
io.github.qurben
jico
2.0.0
```
## Usage
This library comes with one method that can be used to read a file, input stream or url containing a .ico file to a list of images.
The main usecase is reading a .ico file and setting it as the icon on a Swing JFrame, but it can also be
Use the `jico.Ico.read(...)` to read a list of `java.awt.image.BufferedImage` from a `File`, `URL` or `InputStream`.
```
JFrame frame = new JFrame();
frame.setIconImages(Ico.read(getClass().getClassLoader().getResourceAsStream("favicon.ico")));
```
## License
This code is under the [Apache Licence v2](https://www.apache.org/licenses/LICENSE-2.0).
See the `NOTICE.md` file for required notices and attributions.