1.1.4 • Published 4 years ago

async-cgbi-to-png v1.1.4

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

Converter Apple CgBI png to default png

Asynchronous non blocking typescript version

Installation

npm install async-cgbi-to-png

Usage

const { convert } = require('async-cgbi-to-png')
const fs = require('fs')

const ApplePNG = fs.readFileSync('cgbi.png') // return Buffer instance

// using promise
convert(ApplePNG)
  .then(resultPng => {
    // resultPng is a Buffer
    fs.writeFileSync('result.png', resultPng)
  })
  .catch(console.error)

// or using async / await
try {
  const resultPng = await convert(ApplePNG)
} catch(_){}

// or u can pass callback
convert(ApplePNG, (err, resultPng) => {
  if (err) throw err
  fs.writeFileSync('result.png', resultPng)
})
1.1.4

4 years ago

1.1.3

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.1.2

4 years ago

1.0.0

4 years ago