Skip to content

A command line and nodejs module to convert a .png file to an .icns file.

License

Notifications You must be signed in to change notification settings

moinism/png2icns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm version License

png2icns

A command line and nodejs module to convert a .png file to an .icns file. Works on Mac only.

It expects a 1024*1024 png file to convert. If your files is less in size then skip the maximum size in options.

For example, if your file is 512*512:

Command line:

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

In JavaScript:

png2icns({
  in: 'file.png',
  sizes: [16, 32, 64, 128, 256]
}, function () {
  console.log('Successfully converted.');
});

Installation

For command line usage:

npm install png2icns -g

To use programmatically (in NodeJS).

npm install png2icns --save

Usage

Command line

Simply give it path of png file you want to convert.

$ png2icns file_to_convert.png
$ png2icns file.png
$ png2icns file.png -o file.icns // file to output as
$ png2icns file.png -o file.icns -s 16,32,64,128,256,512 // sizes you want in your .icns file

JavaScript

var png2icns = require('png2icns');

png2icns({
  in: 'file.png', // required
  out: 'output.icns' // optional. .icns file name to save the file as. Default: icon.icns
  sizes: [16, 32, 64, 128, 256, 512] // optional.
}, function () {
  console.log('Successfully converted.');
});

About

A command line and nodejs module to convert a .png file to an .icns file.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published