🎉 | Added icon and option to launch windowed.

This commit is contained in:
2024-12-11 18:19:59 +02:00
parent a5d28304c5
commit 4b687f8256
6 changed files with 72 additions and 35 deletions

11
ResourceManager.py Normal file
View File

@ -0,0 +1,11 @@
from PIL import ImageTk, Image
import os
import sys
def resource_path(relative_path):
base_path = getattr(sys, '_MEIPASS', os.path.dirname(os.path.abspath(__file__)))
return os.path.join(base_path, relative_path)
def get_image_and_resize(path_to_image, width, height):
image = Image.open(resource_path(path_to_image)).resize((width, height))
return ImageTk.PhotoImage(image)