Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/steel1990/tga2png
A pure Node.js tga image to png module.
https://github.com/steel1990/tga2png
tga
Last synced: 5 days ago
JSON representation
A pure Node.js tga image to png module.
- Host: GitHub
- URL: https://github.com/steel1990/tga2png
- Owner: steel1990
- Created: 2017-02-16T09:41:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-26T09:35:44.000Z (over 7 years ago)
- Last Synced: 2024-10-30T10:44:32.559Z (12 days ago)
- Topics: tga
- Language: JavaScript
- Size: 2.93 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
tga2png
========
This is a pure Node.js tga image to png module.Requirements
========
* Node.js v6Installation
========
```
$ 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: promiseExample
========
```js
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);
});```