make image to string to use in tkinter code example
Example: make image to string to use in tkinter
import base64
with open("path/to/image.png", "rb") as image_file:
image_data_base64_encoded_string = base64.b64encode(image_file.read())
import base64
with open("path/to/image.png", "rb") as image_file:
image_data_base64_encoded_string = base64.b64encode(image_file.read())