mirror of
https://github.com/danbulant/pngjs
synced 2026-05-26 21:31:56 +00:00
fixed fill
This commit is contained in:
parent
82dd9a96c0
commit
9dc3fc20b1
2 changed files with 30 additions and 14 deletions
|
|
@ -34,10 +34,12 @@ var PNG = exports.PNG = function(options) {
|
|||
|
||||
this.width = options.width || 0;
|
||||
this.height = options.height || 0;
|
||||
|
||||
|
||||
this.data = this.width > 0 && this.height > 0
|
||||
? new Buffer(4 * this.width * this.height) : null;
|
||||
|
||||
if(options.fill && this.data){this.data.fill(0)};
|
||||
|
||||
this.gamma = 0;
|
||||
this.readable = this.writable = true;
|
||||
|
||||
|
|
|
|||
40
package.json
40
package.json
|
|
@ -1,15 +1,29 @@
|
|||
{
|
||||
"name": "pngjs",
|
||||
"version": "0.4.0",
|
||||
"description": "Simple PNG encoder/decoder",
|
||||
"author": "Kuba Niegowski",
|
||||
"contributors": [],
|
||||
"homepage": "https://github.com/niegowski/node-pngjs/",
|
||||
"keywords" : [
|
||||
"png"
|
||||
],
|
||||
"engines": {
|
||||
"node": "0.8.x"
|
||||
},
|
||||
"main": "./lib/png.js"
|
||||
"name": "node-png",
|
||||
"version": "0.4.1",
|
||||
"description": "Simple PNG encoder/decoder",
|
||||
"author": "Kuba Niegowski",
|
||||
"contributors": [],
|
||||
"homepage": "https://github.com/niegowski/node-pngjs/",
|
||||
"keywords": [
|
||||
"png"
|
||||
],
|
||||
"engines": {
|
||||
"node": "0.8.x"
|
||||
},
|
||||
"main": "./lib/png.js",
|
||||
"directories": {
|
||||
"example": "examples"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/brighthas/node-pngjs.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/brighthas/node-pngjs/issues"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue