{"id":26327290,"url":"https://github.com/oleg-cherednik/iconmanager","last_synced_at":"2025-06-25T06:37:31.229Z","repository":{"id":57742757,"uuid":"39721913","full_name":"oleg-cherednik/IconManager","owner":"oleg-cherednik","description":"ImageIO plugin for icon formats (ico, icl, icns)","archived":false,"fork":false,"pushed_at":"2021-01-05T09:23:45.000Z","size":2644,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-03-04T10:44:04.502Z","etag":null,"topics":["icns","ico","icon-manager","icons","imageio","java"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oleg-cherednik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-26T10:31:38.000Z","updated_at":"2023-10-15T15:29:25.000Z","dependencies_parsed_at":"2022-09-09T11:21:30.469Z","dependency_job_id":null,"html_url":"https://github.com/oleg-cherednik/IconManager","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleg-cherednik%2FIconManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleg-cherednik%2FIconManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleg-cherednik%2FIconManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleg-cherednik%2FIconManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oleg-cherednik","download_url":"https://codeload.github.com/oleg-cherednik/IconManager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243785074,"owners_count":20347409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["icns","ico","icon-manager","icons","imageio","java"],"created_at":"2025-03-15T20:18:21.171Z","updated_at":"2025-03-15T20:18:21.842Z","avatar_url":"https://github.com/oleg-cherednik.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Maven Central](https://maven-badges.herokuapp.com/maven-central/ru.oleg-cherednik.icoman/icon-manager/badge.svg)](https://maven-badges.herokuapp.com/maven-central/ru.oleg-cherednik.icoman/icon-manager)\n[![Build Status](https://travis-ci.com/oleg-cherednik/IconManager.svg?branch=master)](https://travis-ci.com/oleg-cherednik/IconManager)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![codecov](https://codecov.io/gh/oleg-cherednik/IconManager/branch/master/graph/badge.svg)](https://codecov.io/gh/oleg-cherednik/IconManager)\n[![Known Vulnerabilities](https://snyk.io//test/github/oleg-cherednik/IconManager/badge.svg?targetFile=build.gradle)](https://snyk.io//test/github/oleg-cherednik/IconManager?targetFile=build.gradle)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/93e1b5be60e545fabdcd9f1138137147)](https://www.codacy.com/app/oleg-cherednik/IconManager?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=oleg-cherednik/IconManager\u0026amp;utm_campaign=Badge_Grade)\n               \n# Icon Manager\n\nThis is java utilite reads different icon formats to use it in the applicaitons (e.g. _Swing_), but it doesn't depend on any _Swing's_ sources).\n\nE.g. in Swing application, usually we use png files for images. This manager provide ability to use any icon formats instead.\n\nCurrently supports:\n- *.ico - Windows Icon\n- *.icl - Windows Icon Library\n- *.icns - Macintosh Icon\n \n##### How do we use images in _Swing_ application\n```java\nJLabel label_16x16_HighColor = new JLabel(new ImageIcon(\"smile_16x16_HighColor.png\"));\nJLabel label_24x24_HighColor = new JLabel(new ImageIcon(\"smile_24x24_HighColor.png\"));\nJLabel label_32x32_HighColor = new JLabel(new ImageIcon(\"smile_32x32_HighColor.png\"));\n```\nIt means, that if we use lot's of different images, we have lot's of files in resources.\n\n##### How to use _Icon Manager_\n- _*.ico_ and _*.icns_\n```java\nIconManager iconManager = IconManager.getInstance();\nFile file = new File(\"smile.ico\");  // or \"smile.icns\"\nString id = file.getName();\niconManager.addIcon(id, ImageIO.createImageInputStream(file));\n\n// get icon from the icon manager\nIconFile iconFile = iconManager.getIconFile(id);\n\nJLabel label_16x16_HighColor = new JLabel(new ImageIcon(iconFile.getImage(ImageKey.parse(16, 16, 16))));\nJLabel label_24x24_HighColor = new JLabel(new ImageIcon(iconFile.getImage(ImageKey.parse(24, 24, 16))));\nJLabel label_32x32_HighColor = new JLabel(new ImageIcon(iconFile.getImage(ImageKey.parse(32, 32, 16))));\n\n// or use id directly in format: \"\u003cwidth\u003ex\u003cheight\u003e_\u003cbitsPerPixel\u003e\"\nJLabel label_16x16_HighColor = new JLabel(new ImageIcon(iconFile.getImage(\"16x16_16\")));\nJLabel label_24x24_HighColor = new JLabel(new ImageIcon(iconFile.getImage(\"24x24_16\")));\nJLabel label_32x32_HighColor = new JLabel(new ImageIcon(iconFile.getImage(\"32x32_16\")));\n```\n- _*.icl_\nThis is a Windows icon library, therefore each icon has it's own name (lower-case) inside the library\n```java\nIconManager iconManager = IconManager.getInstance();\nFile file = new File(\"smile.icl\");\nString id = file.getName();\niconManager.addIcon(id, ImageIO.createImageInputStream(file));\n\n// get icon library from the icon manager\nIclFile iconFile = iconManager.getIconFile(id);\n\n// get list of  existed icons from the library\nSet\u003cString\u003e names = getNames(); // e.g. name = \"Doom\"\nString firstIcon = names.iterator().next();\n\nJLabel label_16x16_HighColor = new JLabel(new ImageIcon(iconFile.getImage(ImageKey.parse(\"Doom\", 16, 16, 16))));\nJLabel label_24x24_HighColor = new JLabel(new ImageIcon(iconFile.getImage(ImageKey.parse(\"Doom\", 24, 24, 16))));\nJLabel label_32x32_HighColor = new JLabel(new ImageIcon(iconFile.getImage(ImageKey.parse(\"Doom\", 32, 32, 16))));\n\n// or use id directly in format: \"\u003ciconMame\u003e_\u003cwidth\u003ex\u003cheight\u003e_\u003cbitsPerPixel\u003e\"\nJLabel label_16x16_HighColor = new JLabel(new ImageIcon(iconFile.getImage(\"doom_16x16_16\")));\nJLabel label_24x24_HighColor = new JLabel(new ImageIcon(iconFile.getImage(\"doom_24x24_16\")));\nJLabel label_32x32_HighColor = new JLabel(new ImageIcon(iconFile.getImage(\"doom_32x32_16\")));\n```     \n##### Links\n* Home page: https://github.com/oleg-cherednik/IconManager\n* Maven:\n  * **central:** https://mvnrepository.com/artifact/ru.oleg-cherednik.icoman/icon-manager\n  * **download:** http://repo1.maven.org/maven2/ru/oleg-cherednik/icoman/icon-manager/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foleg-cherednik%2Ficonmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foleg-cherednik%2Ficonmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foleg-cherednik%2Ficonmanager/lists"}