我不知道如何将图像插入矩形。我正在使用 TKinter。 我有一个长矩形,我想将图像插入到左角,但是如何插入?
from tkinter import *
from tkinter import ttk
root = Tk()
#root.attributes("-fullscreen", True)
root.wm_attributes("-alpha", 1)
root.geometry("300x2000")
root.resizable(width=False, height=False)
head = Canvas(bg="orange", width=1000, height=1000)
head.pack(anchor=NW, expand=1)
im = PhotoImage(file="top.png", width=100, height=100)
label = ttk.Label( image=im, anchor= NW)
head.create_image(1,1 , anchor=NW, image=im)
root.mainloop()
图片被裁剪了