ljc545w / ComWeChatRobot

PC微信机器人,实现获取通讯录,发送文本、图片、文件等消息,封装COM接口供Python、C#调用
1.65k stars 453 forks source link

登录二维码字符串 #119

Closed kaerba closed 2 years ago

kaerba commented 2 years ago

我确定我已经查看了 (标注[x][x])


我要申请 (标注[ ][x])

请问获取到的登录二维码字符串是base64 ,我该以什么方式获取二维码图片

image

duo commented 2 years ago

这个不是base64哈,就是PNG图片的原始byte

ljc545w commented 2 years ago
>>> from io import BytesIO
>>> from PIL import Image
>>> buf = wx.GetQrcodeImage()
>>> image = Image.open(BytesIO(buf)).convert("L")
>>> image.save('./qrcode.png')

大概就像这样。