作者:巡山小妖 | 来源:互联网 | 2023-08-25 23:56
原谅我这个伸手党,完全是头大了。
上代码:
1 2 3 4 5 6 7 8 9 10 11 12 13
| var qr_image = require('qr-image');
var images = require('images');
var request = require('request');
var fs = require('fs');
var logo = request('http:/\/wx.qlogo.cn\/mmopen\/PiajxSqBRaEKqqa31ybC79PqVmErpI2QiapLA5yxT9ampXSa1WrDxcTc6AokhZpBBoOvDYFwTJ5aP6Gvtarcib70w\/64')
.pipe(fs.createWriteStream('logo.jpeg'));
var qr = qr_image.imageSync('http://weixin.qq.com/q/027920JGB8eZ010000M07Q');
var width = images(qr).width() /2 ;
var height = images(qr).height() /2;
var size = width/2;
//images(qr).draw(images('logo.jpeg').size(size),width-size/2,height-size/2).save('t11est.jpeg',{quality:50}); |
我想等logo写入完成后执行注释的代码。请问如何写?
谢谢大神?