npm

Need private packages and team management tools?Check out npm Orgs. »

@fiahfy/icns-convert

0.0.6 • Public • Published

@fiahfy/icns-convert

Convert PNG to Apple Icon Image format.

Installation

npm install @fiahfy/icns-convert

Usage

import fs from 'fs'
import icnsConvert from '@fiahfy/icns-convert'
 
const buf = fs.readFileSync('input.png') // image must be squre, 1024x1024 pixels or larger
icnsConvert(buf).then((data) => {
  fs.writeFileSync('output.icns', data)
})

Specify images by size

const bufs = [
  fs.readFileSync('16x16.png'),
  fs.readFileSync('32x32.png'),
  fs.readFileSync('64x64.png'),
  fs.readFileSync('128x128.png'),
  fs.readFileSync('256x256.png'),
  fs.readFileSync('512x512.png'),
  fs.readFileSync('1024x1024.png')
]
icnsConvert(bufs).then((data) => {
  fs.writeFileSync('output.icns', data)
})

CLI

icns-convert icon.png

install

npm i @fiahfy/icns-convert

Downloadsweekly downloads

591

version

0.0.6

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability