Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/georgechan/pnglib
A PNG lib for node.js
https://github.com/georgechan/pnglib
Last synced: 2 months ago
JSON representation
A PNG lib for node.js
- Host: GitHub
- URL: https://github.com/georgechan/pnglib
- Owner: GeorgeChan
- Created: 2013-08-20T16:01:13.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-01-21T16:05:20.000Z (almost 8 years ago)
- Last Synced: 2024-11-03T14:51:46.305Z (2 months ago)
- Language: JavaScript
- Size: 109 KB
- Stars: 11
- Watchers: 2
- Forks: 8
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#PNGLib
A PNG lib for Node.jsA handy class to calculate color values.
```
version 1.0
author Robert Eisele
copyright Copyright (c) 2010, Robert Eisele
link http://www.xarg.org/2010/03/generate-client-side-png-files-using-javascript/
license http://www.opensource.org/licenses/bsd-license.php BSD License
```
Modified by George Chan##Install
```
npm install pnglib
```##Examples
```javascript
var pnglib = require('pnglib');
var p = new pnglib(300,100,8);
var lineIndex = p.index(10,25);
p.buffer[lineIndex+j]='\x01';
p.color(0, 0, 0, 0); // First color: background (red, green, blue, alpha)
p.color(80, 80, 80, 255); // Second color: paint (red, green, blue, alpha)
```More example see:
https://github.com/GeorgeChan/captchapng