|
|
@ -174,6 +174,13 @@ Canvas.prototype.createPNGStream = function(){ |
|
|
|
return new PNGStream(this); |
|
|
|
}; |
|
|
|
|
|
|
|
/** |
|
|
|
* Return a `Buffer` instance consisting of the PNG image data. |
|
|
|
* |
|
|
|
* @return {Buffer} |
|
|
|
* @api public |
|
|
|
*/ |
|
|
|
|
|
|
|
Canvas.prototype.toBuffer = function(){ |
|
|
|
var buf; |
|
|
|
this.streamPNG(function(err, chunk, len){ |
|
|
|