34
社区成员
发帖
与我相关
我的任务
分享
def b64en(path):
img = open(path, 'rb+').read()
b64_img = b64.b64encode(img)
f = open(path + '.txt', 'w+')
f.write(b64_img.decode('utf-8'))

def b64de(path):
b64_img = open(path, 'r+').read()
img = b64.b64decode(b64_img)
f = open(path + '.png', 'wb+')
f.write(img)

不调库的解码还没写