tga2png

0.1.3 • Public • Published

tga2png

This is a pure Node.js tga image to png module.

Requirements

  • Node.js v6

Installation

$ npm install tga2png --save

API

tga2png(fromPath|buffer, [savePath])

  • fromPath: absolute path of the tga file, or the Buffer
  • savePath: path to save the png, it's optional
  • return: promise

Example

var tga2png = require('tga2png');
tga2png('/path/to/x.tga', '/path/to/x.png').then(buf=> {
    console.log('the png buffer is', buf);
}, err => {
    console.log('error', err);
});
 
tga2png('/path/to/x.tga').then(buf=> {
    console.log('the png buffer is', buf);
}, err => {
    console.log('error', err);
});
 

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.3
    54
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.3
    54
  • 0.1.2
    0
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i tga2png

Weekly Downloads

54

Version

0.1.3

License

MIT

Last publish

Collaborators

  • steel1990