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

ico-convert

badge

Convert Image to ICO file format.

Installation

npm install @fiahfy/ico-convert

Usage

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

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

Specify image for each size

const bufs = [
  fs.readFileSync('16x16.png'),
  fs.readFileSync('24x24.png'),
  fs.readFileSync('32x32.png'),
  fs.readFileSync('48x48.png'),
  fs.readFileSync('64x64.png'),
  fs.readFileSync('128x128.png'),
  fs.readFileSync('256x256.png')
]
convert(bufs).then((data) => {
  fs.writeFileSync('output.ico', data)
})

CLI

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

or use via npx

npx @fiahfy/ico-convert icon.png

Current Tags

  • 0.0.7                                ...           latest (5 months ago)

7 Versions

  • 0.0.7                                ...           5 months ago
  • 0.0.6                                ...           5 months ago
  • 0.0.5                                ...           10 months 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 0
This Week 0
This Month 11
Last Day 0
Last Week 8
Last Month 1
Dependencies (3)
Dev Dependencies (13)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |