我希望使用node.js和gm for node合并2个图像。实际上,我想将一个较小的图像放在坐标x,y上的较大的图像上。
我已经使用append()做了一些工作,但我无法选择将第二个图像放在第一个图像上方。
以下是我的js代码:
我已经使用append()做了一些工作,但我无法选择将第二个图像放在第一个图像上方。
以下是我的js代码:
gm('img/vector/test.svg').append('img/base/test.png').write('img/final/test.png', function(err, stdout, stderr, command){
if (err){
console.log('image conversion error!');
console.log(err);
console.log(command);
}else{
console.log('image converted with command :');
console.log(command);
}
})