Update face_recog.py

main
pos97em56 5 months ago
parent a703526ef5
commit bc48aac6c6

@ -49,16 +49,6 @@ def select_image(root):
else: else:
messagebox.showerror("错误", "没有选择图片路径") 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): def changeSize(event, img, LabelPic):
img_aspect = img.shape[1] / img.shape[0] img_aspect = img.shape[1] / img.shape[0]
new_aspect = event.width / event.height new_aspect = event.width / event.height

Loading…
Cancel
Save