|
|
|
@ -54,19 +54,6 @@ def select_image(root):
|
|
|
|
|
else:
|
|
|
|
|
messagebox.showerror("错误", "没有选择图片路径")
|
|
|
|
|
|
|
|
|
|
def show_selected_image(root):
|
|
|
|
|
"""
|
|
|
|
|
显示选定的图像
|
|
|
|
|
"""
|
|
|
|
|
global img_label
|
|
|
|
|
img_label = tk.Label(root)
|
|
|
|
|
img_label.pack(side=tk.TOP, pady=10)
|
|
|
|
|
img = Image.open(img_path)
|
|
|
|
|
img.thumbnail((160, 160))
|
|
|
|
|
img_tk = ImageTk.PhotoImage(img)
|
|
|
|
|
img_label.configure(image=img_tk)
|
|
|
|
|
img_label.image = img_tk
|
|
|
|
|
|
|
|
|
|
def changeSize(event, img, LabelPic):
|
|
|
|
|
"""
|
|
|
|
|
根据窗口大小调整图像大小
|
|
|
|
|