git ssb

0+

cel-desktop / ssb-pkg



Tree: 65191f9a9664f013ebe726bb95a1a54b086e1bd5

Files: 65191f9a9664f013ebe726bb95a1a54b086e1bd5 / test / test-79-npm / gm / gm.js

438 bytesRaw
1'use strict';
2
3var fs = require('fs');
4var path = require('path');
5var gm = require('gm').subClass({ imageMagick: true });
6
7var input = path.join(__dirname, 'piechart.png');
8var inputStream = fs.createReadStream(input);
9var output = 'piechart-resize.png';
10
11gm(inputStream).resize(240, 240).write(output, function (error) {
12 if (error) throw error;
13 if (fs.existsSync(output)) {
14 fs.unlinkSync(output);
15 console.log('ok');
16 }
17});
18

Built with git-ssb-web