{"id":22963362,"url":"https://github.com/kettek/ico-endec-js","last_synced_at":"2025-10-27T23:35:38.960Z","repository":{"id":42901620,"uuid":"251142982","full_name":"kettek/ico-endec-js","owner":"kettek","description":"WIP ICO encoder and decoder","archived":false,"fork":false,"pushed_at":"2023-10-26T01:09:01.000Z","size":93,"stargazers_count":4,"open_issues_count":7,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-18T23:34:19.525Z","etag":null,"topics":["cur","decoder","encoder","ico","icon","javascript","library","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kettek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2020-03-29T21:56:52.000Z","updated_at":"2024-12-24T07:37:15.000Z","dependencies_parsed_at":"2024-06-19T13:33:16.537Z","dependency_job_id":"65ad04ba-5ea1-47c4-a522-d7d31614b088","html_url":"https://github.com/kettek/ico-endec-js","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/kettek/ico-endec-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kettek%2Fico-endec-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kettek%2Fico-endec-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kettek%2Fico-endec-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kettek%2Fico-endec-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kettek","download_url":"https://codeload.github.com/kettek/ico-endec-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kettek%2Fico-endec-js/sbom","scorecard":{"id":556600,"data":{"date":"2025-08-11","repo":{"name":"github.com/kettek/ico-endec-js","commit":"e8e0ff3c2de2619bb71f0d8ce61a4f4477f81cee"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: Mozilla Public License 2.0: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"11 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4","Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T12:31:46.961Z","repository_id":42901620,"created_at":"2025-08-20T12:31:46.962Z","updated_at":"2025-08-20T12:31:46.962Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281361402,"owners_count":26487881,"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","status":"online","status_checked_at":"2025-10-27T02:00:05.855Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cur","decoder","encoder","ico","icon","javascript","library","nodejs"],"created_at":"2024-12-14T19:34:38.048Z","updated_at":"2025-10-27T23:35:38.920Z","avatar_url":"https://github.com/kettek.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ICO encoder \u0026 decoder\nThis JavaScript library provides an encoder and decoder for ICO and CUR files. Although this library can encode and decode both BMP and PNG images, BMP endec does not provide bitmasking support, and as such, will not work with some icons. However, PNG support is widespread and has become a more defacto standard for application icons, so this problem is largely moot -- but it still would be nice to have.\n\n## Encoding\n### icoEndec.encode([Buffer||ArrayBuffer])\nThe encode function takes an array of ArrayBuffers or Buffers that contain BMP or PNG data. It returns a Buffer containing the binary data of the ICO file.\n\n#### Example\n```\nconst icoEndec   = require('ico-endec')\nconst fsPromises = require('fs').promises\n\n;(async () =\u003e {\n  let icoBuffer = icoEndec.encode([\n    await fsPromises.readFile('myIcon-16x16.png'),\n    await fsPromises.readFile('myIcon-32x32.png'),\n    await fsPromises.readFile('myIcon-64x64.png')\n  ])\n  \n  await fsPromises.writeFile('myIcon.ico', icoBuffer)\n})()\n```\n\n## Decoding\n### icoEndec.decode(Buffer)\nThe decode function takes a Buffer or an ArrayBuffer that holds the binary data of an ICO file. It returns an array of [IconEntries](#iconentry).\n#### Example\n```\nconst icoEndec   = require('ico-endec')\nconst fsPromises = require('fs').promises\n\n;(async () =\u003e {\n  let icons = icoEndec.decode(await fsPromises.readFile('myIcon.ico'))\n  \n  icons.forEach((icon, index) =\u003e {\n    fsPromises.writeFile(`myIcon-${icon.width}x${icon.height}.${icon.imageType}`, icon.imageData)\n  })\n})()\n```\n\n## IconEntry\nThe IconEntry class stores various information about the given icon entry.\n\n| Accessor              | Type | Description |\n|-|-|-|\n| width                 | Number | width of the image, maximum of 256\n| height                | Number | height of the image, maximum of 256\n| colors                | Number | number of colors\n| colorPlanes           | Number | color planes of an ICO image\n| bitsPerPixel          | Number | bits per pixel of an ICO image\n| horizontalHotspot     | Number | horizontal hotspot of a CUR image\n| verticalHotspot       | Number | vertical hotspot of a CUR image\n| imageSize             | Number | (interal) size of imageData's buffer\n| imageOffset           | Number | (interal) offset start of the image data\n| imageType             | String | 'png' or 'bmp'\n| imageData             | [Buffer](https://nodejs.org/api/buffer.html) | image data of the icon\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkettek%2Fico-endec-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkettek%2Fico-endec-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkettek%2Fico-endec-js/lists"}