-
Notifications
You must be signed in to change notification settings - Fork 4
Incorrect output for images around 300x300 pixels and up. #11
Copy link
Copy link
Open
Description
node-pnglib seems to have some trouble producing images around 300x300 pixels and higher. The image seems to stop part-way. That is, the top part of the image looks right, but the bottom is broken in some way (may render as the background color, or may be "blank").
As the image size goes up, the area of the image that looks right stays the same, so I suspect some kind of limit of addressing or file size or something like that.
See the sample script below:
- node v8.11.1
- node-pnglib v1.5.5
const pnglib = require('node-pnglib');
const fs = require('fs');
const W = 300;
const H = 300;
const png = new pnglib(W, H, undefined, 'red');
for (let y = 0; y < H; y ++) {
for (let x = 0; x < W; x ++) {
png.setPixel(x, y, 'blue');
}
}
fs.writeFileSync('test.png', png.getBuffer());Expected output: a blue square.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
