In my python program I have a title image, however it's png background is displaying as white.
My code for my images is as followed:
from tkinter import *
from typing import final
import requests
from PIL import ImageTk, Image
root = Tk()
# get system display settings
screen_width = root.winfo_screenwidth()
screen_height = root.winfo_screenheight()
path = 'C:/Users/Sam/Desktop/Clash Clan Manager/Graphics Based Program/Game Graphics/'
root.title("Clash Clan Manager")
root.iconbitmap(path + 'CCM logo circle.ico')
root.geometry(str(screen_width) + 'x' + str(screen_height-70))
# display title
titleImage= ImageTk.PhotoImage(Image.open(path + 'clash clan manager text.png'))
titleCanvas= Canvas(root, width= 1374, height= 396)
titleCanvas.pack()
titleCanvas.create_image(10,10,anchor=NW,image=titleImage)
# display background image
background = ImageTk.PhotoImage(Image.open(path + 'background image.png'))
backgroundCanvas = Canvas(root, width=screen_width, height = screen_height-70)
backgroundCanvas.pack()
backgroundCanvas.create_image(10,10, anchor=NW, image =background)
root.mainloop(0)
How would I go about making the title transparent?