保存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)