fix: smaller resolution
This commit is contained in:
parent
6d53b41df0
commit
eec72dc87c
4
main.py
4
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)
|
||||
|
Loading…
Reference in New Issue
Block a user