aboutsummaryrefslogtreecommitdiff
path: root/image_to_base64.py
diff options
context:
space:
mode:
Diffstat (limited to 'image_to_base64.py')
-rw-r--r--image_to_base64.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/image_to_base64.py b/image_to_base64.py
new file mode 100644
index 0000000..b14a309
--- /dev/null
+++ b/image_to_base64.py
@@ -0,0 +1,9 @@
+import base64
+
+open_icon = open("./assets/worldsy.ico", "rb")
+b64str = base64.b64encode(open_icon.read())
+open_icon.close()
+write_data = ("img = %s" % b64str)
+f = open("icon.py", "w+")
+f.write(write_data)
+f.close() \ No newline at end of file