2.0.0 • Published 5 years ago

pngtopgm v2.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

PNG to PGM

A simple library that convert PNG files to PGM files.

Installation

npm install pngtopgm

Basic Usage

The module exposes a single function that takes a buffer as the argument. It returns a buffer containing the PGM file data in ASCII format.

pngToPgm(buffer)
const pngToPgm = require('pngtopgm');
const fs = require('fs');

let myPng = fs.readFileSync('./myPng.png');
let myPgm = pgnToPgm(myPng);
fs.writeFileSync('./myPgm.pgm', myPgm);

Development

Run unit tests and linting with:

npm run test
npm run lint
2.0.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago