Interface to composite RGB/RGBA buffers together into larger buffers representing images.
var PixelStack = require('pixel-stack');
var stack = new PixelStack;
stack.fill([0,0,0]);
stack.push([255,255,255,255,255,255], 0, 0, 2, 1);
stack.push([255,255,255,255,255,255], 0, 1, 2, 1);
stack.buffer();
type can be 'rgb' or 'rgba'. Defaults to rgb.data pixel buffer at the coordinates x,ydata can be any Array-like datastructure (Buffer, ArrayBuffer).stride can be a Number representing the size in bytes of each row,
in case there's byte padding.PixelStack instance.data pixel buffer as background color.0,0,0) upon
the first call to push or buffer.PixelStack instance.width of the stack. Useful when not specified in the
constructor and calculated dynamically.height of the stack. Useful when not specified in the
constructor and calculated dynamically.Buffer.Inspired by the FixedJpegStack and DynamicJpegStack interfaces of
the node-jpeg project by @pkrumins.
MIT – Copyright (c) 2014 Automattic, Inc.