From 58da88e5d6f3ace18c5ea0e4b11f686179e30daf Mon Sep 17 00:00:00 2001 From: henryruhs Date: Mon, 5 Jun 2023 20:45:36 +0200 Subject: [PATCH] Change face and target images from contain to fit --- roop/ui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roop/ui.py b/roop/ui.py index bedc4d4..18863e2 100644 --- a/roop/ui.py +++ b/roop/ui.py @@ -199,7 +199,7 @@ def open_preview_window(get_video_frame, target_path): def preview_face(path): img = Image.open(path) - img = ImageOps.contain(img, (180, 180), Image.LANCZOS) + img = ImageOps.fit(img, (180, 180), Image.LANCZOS) photo_img = ImageTk.PhotoImage(img) face_label.configure(image=photo_img) face_label.image = photo_img @@ -207,7 +207,7 @@ def preview_face(path): def preview_target(frame): img = Image.fromarray(frame) - img = ImageOps.contain(img, (180, 180), Image.LANCZOS) + img = ImageOps.fit(img, (180, 180), Image.LANCZOS) photo_img = ImageTk.PhotoImage(img) target_label.configure(image=photo_img) target_label.image = photo_img