Browse Source

tweak png/jpeg stream examples in source

v1.x
Tj Holowaychuk 13 years ago
parent
commit
ec87f5ae85
  1. 8
      lib/jpegstream.js
  2. 8
      lib/pngstream.js

8
lib/jpegstream.js

@ -21,13 +21,7 @@ var Stream = require('stream').Stream;
* var out = fs.createWriteStream(__dirname + '/my.jpeg')
* , stream = canvas.createJPEGStream();
*
* stream.on('data', function(chunk){
* out.write(chunk);
* });
*
* stream.on('end', function(){
* out.end();
* });
* stream.pipe(out);
*
* @param {Canvas} canvas
* @param {Boolean} sync

8
lib/pngstream.js

@ -21,13 +21,7 @@ var Stream = require('stream').Stream;
* var out = fs.createWriteStream(__dirname + '/my.png')
* , stream = canvas.createPNGStream();
*
* stream.on('data', function(chunk){
* out.write(chunk);
* });
*
* stream.on('end', function(){
* out.end();
* });
* stream.pipe(out);
*
* @param {Canvas} canvas
* @param {Boolean} sync

Loading…
Cancel
Save