How to do composite with gm node.js?

前端 未结 6 1263
情话喂你
情话喂你 2020-12-24 08:22

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 <

6条回答
  •  甜味超标
    2020-12-24 09:23

    If you want to resize and merge, you can use this:

    gm()
    .in('-geometry', '+0+0')
    .in('./img/img1.png')
    .in('-geometry', '300x300+100+200')
    .in('./img/img2.png')
    .flatten()
    .write('resultGM.png', function (err) {
      if (err) console.log(err);
    });
    

提交回复
热议问题