@fiahfy/icns-convert
Convert Image to Apple Icon Image format
Last updated 5 months ago by fiahfy .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @fiahfy/icns-convert 
SYNC missed versions from official npm registry.

icns-convert

badge

Convert Image to Apple Icon Image format.

Installation

npm install @fiahfy/icns-convert

Usage

import fs from 'fs'
import { convert } from '@fiahfy/icns-convert'

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

Specify image for each 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')
]
convert(bufs).then((data) => {
  fs.writeFileSync('output.icns', data)
})

CLI

npm install -g @fiahfy/icns-convert
icns-convert icon.png

or use via npx

npx @fiahfy/icns-convert icon.png

Current Tags

  • 0.0.8                                ...           latest (5 months ago)

8 Versions

  • 0.0.8                                ...           5 months ago
  • 0.0.7                                ...           5 months ago
  • 0.0.6                                ...           10 months ago
  • 0.0.5                                ...           a year ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 25
Last Day 0
Last Week 15
Last Month 12
Dependencies (3)
Dev Dependencies (13)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |