Skip to content

Commit

Permalink
Merge pull request #383 from matthewaveryusa/patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
rwky committed Apr 23, 2015
2 parents 8c8c5da + 6fca0a1 commit f47b430
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -150,7 +150,7 @@ gm('/path/to/my/img.jpg')

// combine the two for true streaming image processing
var readStream = fs.createReadStream('/path/to/my/img.jpg');
gm(readStream, 'img.jpg')
gm(readStream)
.resize('200', '200')
.stream(function (err, stdout, stderr) {
var writeStream = fs.createWriteStream('/path/to/my/resized.jpg');
Expand All @@ -163,7 +163,7 @@ gm(readStream, 'img.jpg')
// you also need to convert (write() or stream()) the image afterwards
// NOTE: this buffers the readStream in memory!
var readStream = fs.createReadStream('/path/to/my/img.jpg');
gm(readStream, 'img.jpg')
gm(readStream)
.size({bufferStream: true}, function(err, size) {
this.resize(size.width / 2, size.height / 2)
this.write('/path/to/resized.jpg', function (err) {
Expand Down

0 comments on commit f47b430

Please sign in to comment.