async-icns
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

async-icns

Convert image files to MacOS icon file (.icns) files.

License Compat Version

Installation

CLI global install:

npm install async-icns -g

To use programmatically (in NodeJS).

npm install async-icns --save
# Or for yarn
yarn add async-icns

CLI Usage

$ async-icns file.png

Note that if your icon is smaller than 1024 × 1024, you will have to remove one of the size options. Make sure that the largest size you request is less than half the size as your icon. For example, if one of your icons was 512 × 512, the max icon size would be 256 × 256:

$ async-icns file.png -s 16,32,64,128,256

You can aso specify the alternative output:

$ async-icns file.png -o output.icns

As a library

const { convert } = require('async-icns')

async function main() {
  await convert({ input: 'file.png', output: 'output.icns' })
}

main()

You can also specify the output size in the same way as specifed above:

const { convert } = require('async-icns')

async function main() {
  await convert({
    input: 'file.png',
    output: 'output.icns',
    sizes: [16, 32, 64, 128, 256],
  })
}

main()

Package Sidebar

Install

npm i async-icns

Weekly Downloads

29

Version

1.0.2

License

MIT

Unpacked Size

8.74 kB

Total Files

7

Last publish

Collaborators

  • trickypr