Skip to content

Commit

Permalink
Use stream-based input.
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed May 23, 2016
1 parent 0678a2a commit 5c97369
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ sharp.cache(false);

var fileName = '100mpix.jpg';

var image = fs.readFileSync(pathModule.resolve(__dirname, '100mpix.jpg'));

var singleTest = function(cb) {
var i = sharp(Buffer.concat([image]));
var i = sharp();
i.embed().interpolateWith(sharp.interpolator.bicubic)
.resize(1000,1000).rotate()
.background({r:0,g:0,b:0,a:0}).quality(75)
Expand All @@ -20,6 +18,7 @@ var singleTest = function(cb) {
}
cb();
});
fs.createReadStream(pathModule.resolve(__dirname, '100mpix.jpg')).pipe(i);
};

var run = function(name) {
Expand Down

0 comments on commit 5c97369

Please sign in to comment.