保存b64圖片 dic['image']爲圖片數據
with open('imgcode.png', 'wb') as f:
f.write(base64.b64decode(dic['image']))
#open('imgcode.png')
return True
Pyqt5 窗口顯示 圖片
pimg = base64.b64decode(self.dics['image'])
png = QPixmap(100, 100)
png.loadFromData(pimg)
self.lable = QLable()
self.lable.setPixmap(png)