📌  相关文章
📜  如何在 python tkinter 中调整图像大小 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:21.178000             🧑  作者: Mango

代码示例1
from tkinter import *
from PIL import ImageTk, Image
root=Tk()

image = Image.open('path_to_your_image.png')
# The (450, 350) is (height, width)
image = image.resize((450, 350), Image.ANTIALIAS)
my_img = ImageTk.PhotoImage(image)
my_img = Label(image = my_img)
my_img.pack()

root.mainloop()