'How to remove background colour of image in tkinter
here cherri image on main window is in png but still its covering lots of space ?i want to remove that white background
from tkinter import *
from PIL import Image,ImageTk
root=Tk()
root.geometry('600x650+400+20')
root.title('C H E R R I')
bgimage = PhotoImage(file='Images/bg.png')
bgLabel = Label(root,image=bgimage)
bgLabel.place(x=-1,y=0)
#Create a canvas
canvas= Canvas(root, width= 600, height= 400)
canvas.pack()
img= (Image.open("Images/Login1.png"))
resized_image= img.resize((270,180), Image.ANTIALIAS)
new_image= ImageTk.PhotoImage(resized_image)
canvas.create_image(160,70, anchor=NW, image=new_image)
root.resizable(False, False)
root.mainloop()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

