import base64
img_path = r'2576e1674fa40078644ea61061bf12e4.png'
with open(img_path, 'rb') as f:
ls = base64.b64encode(f.read())
print(ls)
图片转base64字符串
阅读 101
2022-02-26
import base64
img_path = r'2576e1674fa40078644ea61061bf12e4.png'
with open(img_path, 'rb') as f:
ls = base64.b64encode(f.read())
print(ls)
相关推荐
精彩评论(0)