Archived
feat: fix bug
This commit is contained in:
7 files changed
+23
-23
No files matched your search
@@ -4,3 +4,4 @@
|
||||
# @Development Tool: PyCharm
|
||||
# @Create Time: 2022/2/5
|
||||
# @File Name: __init__.py.py
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# -- coding:utf-8 --
|
||||
# @Author: markushammered@gmail.com
|
||||
# @Development Tool: PyCharm
|
||||
# @Create Time: 2022/2/6
|
||||
# @File Name: logger.py
|
||||
+4
-11
@@ -14,17 +14,10 @@ def convert() -> None:
|
||||
:return:
|
||||
"""
|
||||
# image转base64
|
||||
lst = []
|
||||
for i in range(10):
|
||||
with open(f'../../static/theme/t2/{i}.svg', 'rb') as f:
|
||||
base64_data = base64.b64encode(f.read())
|
||||
base64_code = 'data:image/jpeg;base64,' + base64_data.decode('utf-8')
|
||||
lst.append(base64_code)
|
||||
|
||||
print(lst)
|
||||
|
||||
for i in lst:
|
||||
print(i)
|
||||
with open(f'../../static/example.png', 'rb') as f:
|
||||
base64_data = base64.b64encode(f.read())
|
||||
base64_code = 'data:image/jpeg;base64,' + base64_data.decode('utf-8')
|
||||
print(base64_code)
|
||||
|
||||
|
||||
convert()
|
||||
Reference in New Issue
Block a user