Browse Source

Added Canvas#toBuffer() docs

v1.x
Tj Holowaychuk 14 years ago
parent
commit
a37706c66a
  1. 7
      lib/canvas.js

7
lib/canvas.js

@ -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){

Loading…
Cancel
Save