How to do \'gm composite -gravity center change_image_url base_image_url\' with GM Node.js?
How to call gm().command()
& gm().in()
or <
Why does nobody use composite
command? (https://github.com/aheckmann/gm)
var gm = require('gm');
var bgImage = 'bg.jpg',
frontImage = 'front.jpg',
resultImage = 'result.jpg',
xy = '+100+150';
gm(bgImage)
.composite(frontImage)
.geometry(xy)
.write(resultImage, function (err) {
if (!err) console.log('All done');
});
UPDATE Oh, I watched history of source of this method. It becomes available only on 2014