Archived
图片到base64编码的代码
This commit is contained in:
1 file changed
+6
-1
@@ -4,3 +4,8 @@
|
||||
# @Development Tool: PyCharm
|
||||
# @Create Time: 2022/2/12
|
||||
# @File Name: img2base64.py
|
||||
|
||||
|
||||
import base64
|
||||
|
||||
print(base64.b64encode(open('example.png', 'rb').read()).decode('utf-8'))
|
||||
Reference in New Issue
Block a user