From eec72dc87cddd7dc83a553fa3c865a79a62bda0b Mon Sep 17 00:00:00 2001 From: alban Date: Sun, 15 Dec 2024 17:20:00 +0100 Subject: [PATCH] fix: smaller resolution --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index ffed30c..57a6547 100644 --- a/main.py +++ b/main.py @@ -98,7 +98,7 @@ class OpenCVInterface: self.create_slider(left_frame, var_name, var, min_val, max_val) # Right Column: Image Placeholder - self.image_canvas = tk.Canvas(self.root, bg="gray", width=1024, height=768) + self.image_canvas = tk.Canvas(self.root, bg="gray", width=800, height=600) self.image_canvas.grid(row=0, column=1, sticky="nswe") # Bottom Row: Run Button and Result @@ -146,7 +146,7 @@ class OpenCVInterface: pil_image = Image.fromarray(image) # Convert numpy array to PIL Image # Rescale image to fit within 1024x768 while preserving aspect ratio - max_width, max_height = 1024, 768 + max_width, max_height = 800, 600 original_width, original_height = pil_image.size aspect_ratio = min(max_width / original_width, max_height / original_height) new_width = int(original_width * aspect_ratio)