import base64
f=open(r'a:\a.jpg','rb') #二进制方式打开图文件
ls_f=base64.b64encode(f.read()) #读取文件内容,转换为base64编码
f.close()
print ls_f

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
  • 2021-06-05
  • 2022-12-23
  • 2021-10-01
  • 2023-03-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-22
  • 2021-05-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案