{"_id":"@catdad/to-ico","_rev":"3-0ee25ebeec165e08ea9d6223cdca9742","name":"@catdad/to-ico","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@catdad/to-ico","version":"1.0.0","keywords":["buffer","convert","fast","ico","png"],"license":"MIT","_id":"@catdad/to-ico@1.0.0","maintainers":[{"name":"catdad","email":"vatev.1@gmail.com"}],"contributors":[{"url":"github.com/kevva","name":"Kevin Martensson","email":"kevinmartensson@gmail.com"},{"url":"github.com/catdad","name":"Kiril Vatev","email":"vatev.1@gmail.com"}],"homepage":"https://github.com/catdad-experiments/to-ico#readme","bugs":{"url":"https://github.com/catdad-experiments/to-ico/issues"},"dist":{"shasum":"e04a2402391e6b1a757d6f1b5ab1fac16448678b","tarball":"https://registry.npmjs.org/@catdad/to-ico/-/to-ico-1.0.0.tgz","fileCount":4,"integrity":"sha512-OzAxZsvNjHEGZ+oJJCfSVKcFjGnP5xBe+X8AuYUJUgrGaS9PV7gX9lFLMFkRnThBJyBX9WcOUeJj/pHKHBrJ9A==","signatures":[{"sig":"MEUCIAYIrmfbgLli6ucE3xSlGl5riESMzDJiTuV7NgCZmWPdAiEA2clkjJzjkzZkeHjsb/T1K/AkS5b+Nkve5+bgJoFiSf0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFhpMCRA9TVsSAnZWagAACEgP/RaW3PyYuZDi2PhPacbe\nvRiaSDWL6hSSnnHMdbUhAD49cPdwoTCQTlOOn9ASjCBwgOqnkEAvJ17nn039\nZsf9mn5truZgdNyLTSpc7icQz+YLIc9R+V7TkYTLdRSXYhvdpfrzjfYnJHOL\nfpZS23dzeVOnOFNX5se+dO/Bf+kyzmih9dAIPcz4w5rWFtZkFOVt2jnJRUOs\nglfYWYpSSymff+t6lnK0/fYhO+CpjAGhrVnIneXtjWCPIFpv7uNkg3H5T9sw\n1YnXSmLoPCYP+MVoG0nMsCPpprrZUf5/tjThxVA/HCHlBO8RFQC6mZ0DbHzU\n1cIYi17y05wAF7gQJqgiyDNV7caqXQrkFALcMf3KgUzcxLYbzdg+F/zuvziP\n9HFmL+74Ej48yzUiAjsfgw42QqMb42DTEruElKrDGg6HzaJ7jW2BUIs8Xgyq\nBf+2WDMeRumHWquTQVOxRv7iyu0fAE0MIy0+/ouqYWBTuQJw7kma261DoIbL\nhE6fYbvly2kZJT7qVVhY95Z/H5/2AuHhtGEQNeAohiuaxwKWFXjYzNL5/Nva\npiyGS1g64EklyElYnJ53lB4PnwHSTQYS9XXQsxzGRcLu90n4K+VeFXGeAjG/\nCbiQu+XdZO7wpDki/HcDdq/Hq1EOdtaqoPrvXkK4FpmO87QD68WCx69hDKrg\nPqaR\r\n=ubVK\r\n-----END PGP SIGNATURE-----\r\n"},"engines":{"node":">=8.0.0"},"gitHead":"8a628160a5633195dcbc2ab1cac84fc968fbb0ea","scripts":{"test":"eslint index.js test.js && ava --verbose"},"_npmUser":{"name":"catdad","email":"vatev.1@gmail.com"},"repository":{"url":"git+https://github.com/catdad-experiments/to-ico.git","type":"git"},"_npmVersion":"6.14.5","description":"Convert PNG images to ICO","directories":{},"_nodeVersion":"14.5.0","dependencies":{"parse-png":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^1.4.1","eslint":"^5.16.0","file-type":"^4.3.0"},"_npmOperationalInternal":{"tmp":"tmp/to-ico_1.0.0_1595284043582_0.5750453036775742","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-07-20T22:27:23.551Z","modified":"2026-08-31T05:34:12.851Z","1.0.0":"2020-07-20T22:27:23.697Z"},"bugs":{"url":"https://github.com/catdad-experiments/to-ico/issues"},"license":"MIT","homepage":"https://github.com/catdad-experiments/to-ico#readme","keywords":["buffer","convert","fast","ico","png"],"repository":{"url":"git+https://github.com/catdad-experiments/to-ico.git","type":"git"},"description":"Convert PNG images to ICO","contributors":[{"url":"github.com/kevva","name":"Kevin Martensson","email":"kevinmartensson@gmail.com"},{"url":"github.com/catdad","name":"Kiril Vatev","email":"vatev.1@gmail.com"}],"maintainers":[{"email":"vatev.1+npm@gmail.com","name":"kirilv"},{"email":"vatev.1@gmail.com","name":"catdad"}],"readme":"# @catdad/to-ico [![Build Status](https://travis-ci.com/catdad-experiments/to-ico.svg?branch=master)](https://travis-ci.com/catdad-experiments/to-ico)\n\n> Convert PNG images to ICO\n\nThis module is a fork of [`kevva/to-ico`](https://github.com/kevva/to-ico), removing the resize code. This code was quite old and had problematic dependecnies, and my use case did not require it.\n\n## Install\n\n```bash\nnpm install --save @catdad/to-ico\n```\n\n## Usage\n\n```js\nconst fs = require('fs');\nconst toIco = require('@catdad/to-ico');\n\nconst files = [\n  fs.readFileSync('unicorn-16x16.png'),\n  fs.readFileSync('unicorn-24x24.png'),\n  fs.readFileSync('unicorn-32x32.png'),\n  fs.readFileSync('unicorn-48x48.png'),\n  fs.readFileSync('unicorn-64x64.png'),\n  fs.readFileSync('unicorn-128x128.png'),\n  fs.readFileSync('unicorn-256x256.png')\n];\n\ntoIco(files).then(buf => {\n  fs.writeFileSync('favicon.ico', buf);\n});\n```\n\n## API\n\n### toIco(images)\n\n#### input\n\nType: `Array`\n\nArray of PNG image buffers.\n\nThe images must have a size of `16x16`, `24x24`, `32x32`, `48x48`, `64x64`, `128x128` or `256x256` and they must have an 8 bit per sample (channel) bit-depth (on Unix you can check this with the `file` command: RGB(A) is supported, while [colormap](https://en.wikipedia.org/wiki/Indexed_color) is not, because it's 8 bits per pixel instead of 8 bits per channel, which is 24 or 32 bits per pixel depending on the presence of the alpha channel). These are limitations in the underlying [`pngjs`](https://github.com/lukeapage/pngjs#pngjs) library. If you have a colormap PNG you can convert it to an RGB/RGBA PNG with commonly used image editing tools.\n\n## Related\n\n* [to-ico](https://github.com/kevva/to-ico) - the original module that this is a fork of\n* [to-ico-cli](https://github.com/kevva/to-ico-cli) - CLI for this module\n\n## License\n\nMIT © [Kevin Martensson](http://github.com/kevva)\n","readmeFilename":"readme.md"}