{"id":28394780,"url":"https://github.com/sveinbjornt/icnsoptim","last_synced_at":"2026-05-01T00:31:36.436Z","repository":{"id":295277034,"uuid":"989680101","full_name":"sveinbjornt/icnsoptim","owner":"sveinbjornt","description":"Losslessly optimize Apple .icns icon files","archived":false,"fork":false,"pushed_at":"2025-05-30T11:20:16.000Z","size":1406,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-01T06:26:21.317Z","etag":null,"topics":["apple-icons","command-line-tool","icns","icons","iconset","lossless-image-compression","mac-icon","macos","macos-icons","macosx","optimization","osx"],"latest_commit_sha":null,"homepage":"https://sveinbjorn.org/icnsoptim","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sveinbjornt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":["https://paypal.me/sveinbjornt","sveinbjorn.org/donations"]}},"created_at":"2025-05-24T15:49:41.000Z","updated_at":"2025-05-30T11:19:54.000Z","dependencies_parsed_at":"2025-05-24T16:55:01.048Z","dependency_job_id":null,"html_url":"https://github.com/sveinbjornt/icnsoptim","commit_stats":null,"previous_names":["sveinbjornt/icnsoptim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sveinbjornt/icnsoptim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sveinbjornt%2Ficnsoptim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sveinbjornt%2Ficnsoptim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sveinbjornt%2Ficnsoptim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sveinbjornt%2Ficnsoptim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sveinbjornt","download_url":"https://codeload.github.com/sveinbjornt/icnsoptim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sveinbjornt%2Ficnsoptim/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262172364,"owners_count":23269992,"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":["apple-icons","command-line-tool","icns","icons","iconset","lossless-image-compression","mac-icon","macos","macos-icons","macosx","optimization","osx"],"created_at":"2025-05-31T19:00:19.988Z","updated_at":"2026-05-01T00:31:36.359Z","avatar_url":"https://github.com/sveinbjornt.png","language":"Shell","funding_links":["https://paypal.me/sveinbjornt","sveinbjorn.org/donations"],"categories":[],"sub_categories":[],"readme":"[![macOS](https://img.shields.io/badge/macOS-000000?style=flat\u0026logo=apple\u0026logoColor=white)]()\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n\n# icnsoptim\n\n`icnsoptim` is a macOS command line script to ***losslessly*** optimize Apple Icon (`.icns`)\nfiles. This is accomplished by disassembling the file, brute-force-optimizing the PNG images\nwithin using [`oxipng`](https://github.com/shssoichiro/oxipng) and then rebuilding\nthe icon with [`createicns`](https://github.com/avl7771/createicns), a utility which\ndoesn't bloat and tamper with the provided PNG files, unlike Apple's suboptimal\n[`iconutil`](https://www.unix.com/man_page/osx/1/iconutil).\n\nLossless compression results vary from file to file but are usually significant,\ntypically around 20-50%. An experiment where optimization was performed on all icon files\nin the `/Applications` directory hierarchy resulted in an average ~30% reduction in size.\n\n## How to use\n\nThe repository contains the bash script `imgoptim.sh`, which optimizes icons via the command line.\nUse it thus:\n\n```bash\nbash icnsoptim.sh path/to/file.icns\n```\n\nThis will create a new file named `file-optimized.icns` in the current working directory.\nIn order to work, `oxipng` and `createicns` binaries need to be present in the same directory as\nthe script. You can optionally specify the path to the output file:\n\n```bash\n$ bash icnsoptim.sh --help\nUsage: icnsoptim.sh \u003cinput.icns\u003e [output_path/output.icns]\n  \u003cinput.icns\u003e: Path to the .icns file to optimize.\n  [output_path/output.icns]: Optional. Full path for the optimized .icns file.\n                             If not provided, output will be \u003cinput_basename\u003e-optimized.icns\n                             in the current working directory.\n```\n\n## BSD License\n\nCopyright (C) 2025 Sveinbjorn Thordarson\n\u0026lt;\u003ca href=\"mailto:sveinbjorn@sveinbjorn.org\"\u003esveinbjorn@sveinbjorn.org\u003c/a\u003e\u0026gt;\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice, this\nlist of conditions and the following disclaimer in the documentation and/or other\nmaterials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors may\nbe used to endorse or promote products derived from this software without specific\nprior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\nIN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\nINDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\nNOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\nPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\nWHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsveinbjornt%2Ficnsoptim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsveinbjornt%2Ficnsoptim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsveinbjornt%2Ficnsoptim/lists"}