I wanted to create a graphical interface for my project, but when I tried to insert the project logo into tkinter, the logo was displayed with extra borders, which are not in the image itself.
import tkinter as tk
from PIL import Image, ImageTk
height: int = 500
width: int = 700
root = tk.Tk()
root.title("quick_trade")
root.geometry(f"{width}x{height}")
root.configure(background='#333')
def open_img(path, size=(250, 200)):
x = path
image = Image.open(x)
image = image.resize(size, Image.ANTIALIAS)
image = ImageTk.PhotoImage(image)
return image
img = open_img('dark.PNG')
label = tk.Label(root, image=img)
label.pack()
root.mainloop()
