mirror of https://gitgud.io/fatchan/gm
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
409 B
16 lines
409 B
|
|
var fs = require('fs');
|
|
|
|
module.exports = function (_, dir, finish, gm) {
|
|
|
|
if (!gm.integration)
|
|
return finish();
|
|
|
|
gm(fs.createReadStream(dir + '/original.jpg'), "original.jpg")
|
|
.stream(function streamOut (err, stdout, stderr) {
|
|
if (err) return finish(err);
|
|
stdout.pipe(fs.createWriteStream(dir + '/streamInOut.jpg'));
|
|
stdout.on('error', finish);
|
|
stdout.on('close', finish);
|
|
});
|
|
}
|
|
|