Socket
Socket
Sign inDemoInstall

to-ico

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

to-ico

Convert PNG to ICO in memory


Version published
Maintainers
1
Created
Source

to-ico Build Status

Convert PNG to ICO in memory

Install

$ npm install --save to-ico

Usage

const fs = require('fs');
const toIco = require('to-ico');

const files = [
	fs.readFileSync('unicorn-16x16.png'),
	fs.readFileSync('unicorn-32x32.png')
];

toIco(files).then(buf => {
	fs.writeFileSync('favicon.ico', buf);
});

API

toIco(input, [options])

input

Type: Array string

An array of PNG image buffers.

options
resize

Type: boolean
Default: false

Use the largest image and resize to sizes defined using the sizes option.

sizes

Type: Array
Default: [16, 24, 32, 48, 64, 128, 256]

Array of sizes to use when resizing.

  • to-ico-cli - CLI for this module

License

MIT © Kevin Martensson

Keywords

FAQs

Package last updated on 19 Sep 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc