
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
A JavaScript library to use ICO. Work on both Node.js and Browser.
npm install icojs
const ICO = require('icojs');
const ICO = require('icojs/browser')
or
<script type="text/javascript" src="node_modules/icojs/dist/ico.js"></script>
To fully use this library, browsers must support JavaScript typed arrays, Canvas API and Promise. Chrome, Edge 12, Firefox and Safari 9 support these functions.
const fs = require('fs');
const ICO = require('icojs');
const arrayBuffer = new Uint8Array(fs.readFileSync('favicon.ico')).buffer;
ICO.parse(arrayBuffer, 'image/png').then(images => {
// save as png files
images.forEach(image => {
const file = `${image.width}x${image.height}-${image.bit}bit.png`;
const data = Buffer.from(image.buffer);
fs.writeFileSync(file, data);
});
});
<input type="file" id="input-file" />
<script>
document.getElementById('input-file').addEventListener('change', function (evt) {
// use FileReader for converting File object to ArrayBuffer object
var reader = new FileReader();
reader.onload = function (e) {
ICO.parse(e.target.result).then(function (images) {
// logs images
console.dir(images);
})
};
reader.readAsArrayBuffer(evt.target.files[0]);
}, false);
</script>
https://egy186.github.io/icojs/#demo
Promise.<Array.<Object>>BooleanICOPromise.<Array.<Object>>Parse ICO and return some images.
Kind: static method of ICO
Returns: Promise.<Array.<Object>> - Resolves to array of parsed ICO.
width Number - Image width.height Number - Image height.bit Number - Image bit depth.buffer ArrayBuffer - Image buffer.| Param | Type | Default | Description |
|---|---|---|---|
| buffer | ArrayBuffer | The ArrayBuffer object contain the TypedArray of a ICO file. | |
| [mime] | String | image/png | MIME type for output. |
BooleanCheck the ArrayBuffer is valid ICO.
Kind: static method of ICO
Returns: Boolean - True if arg is ICO.
| Param | Type | Description |
|---|---|---|
| buffer | ArrayBuffer | The ArrayBuffer object contain the TypedArray of a ICO file. |
ICONo conflict.
Kind: static method of ICO
Returns: ICO - ICO Object.
MIT license
FAQs
parse ico file
We found that icojs-min demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.