import base64 f=open(r'a:\a.jpg','rb') #二进制方式打开图文件 ls_f=base64.b64encode(f.read()) #读取文件内容,转换为base64编码 f.close() print ls_f
Copyright © 2024 血染&征袍 Powered by .NET 9.0 on Kubernetes