Home > Software engineering >  is there a way to remove white outline when placing image on tk window?
is there a way to remove white outline when placing image on tk window?

Time:11-07

When I try to add an image from another directory to the tk window. This is the png file.This is what appears in the tk window The image has a white outline around it. The png file has no white outline so there must problem when its being added to the tk window. Here is the code so far below :

from tkinter import *
from PIL import Image, ImageTk
 
window = Tk()
window.configure(bg = '#73767A')

im = Image.open("static/logo.png")
im = ImageTk.PhotoImage(im.resize((400,225), Image.ANTIALIAS))
Label(image = im).place(x = 200, y = 0) 

CodePudding user response:

You can set the borderwidth and highlightthickness attributes to zero.

  • Related