diff --git a/croppa/main.py b/croppa/main.py index aed04eb..7a0062b 100644 --- a/croppa/main.py +++ b/croppa/main.py @@ -2907,24 +2907,10 @@ class VideoEditor: scale_y = available_height / height scale = min(scale_x, scale_y) # Use the smaller scale to ensure video fits - # Ensure scale is never greater than 1.0 to prevent upscaling beyond screen - scale = min(scale, 1.0) - # Calculate scaled dimensions scaled_width = int(width * scale) scaled_height = int(height * scale) - # Double-check that scaled dimensions fit within available space - if scaled_height > available_height: - scale = available_height / height - scaled_width = int(width * scale) - scaled_height = int(height * scale) - - if scaled_width > actual_width: - scale = actual_width / width - scaled_width = int(width * scale) - scaled_height = int(height * scale) - # Resize the frame to fit the window while maintaining aspect ratio if scale != 1.0: display_frame = cv2.resize(display_frame, (scaled_width, scaled_height), interpolation=cv2.INTER_LINEAR)