From 525ecd2cf521d13589f1457dbebace6f5e5ef0a3 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Thu, 4 Sep 2025 16:47:45 +0200 Subject: [PATCH] Remove weird ass overlay --- croppa/main.py | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/croppa/main.py b/croppa/main.py index 6df261f..b88c651 100644 --- a/croppa/main.py +++ b/croppa/main.py @@ -645,44 +645,6 @@ class VideoEditor: 1, ) - def draw_crop_overlay(self, canvas, start_x, start_y, frame_width, frame_height): - """Draw crop overlay on canvas using screen coordinates""" - # Note: crop_preview_rect disabled as it was showing in wrong position - # The final crop rectangle (red) is sufficient for visual feedback - - # Draw final crop rectangle (red) - convert from video to screen coordinates - if self.crop_rect: - # Convert crop coordinates from original video to screen coordinates - x, y, w, h = self.crop_rect - - # Apply the same scaling logic as in display_current_frame - original_height, original_width = self.current_display_frame.shape[:2] - available_height = self.window_height - self.TIMELINE_HEIGHT - - scale = min( - self.window_width / original_width, available_height / original_height - ) - if scale < 1.0: - new_width = int(original_width * scale) - new_height = int(original_height * scale) - else: - new_width = original_width - new_height = original_height - - # Convert video coordinates to screen coordinates - screen_x = start_x + (x * new_width / original_width) - screen_y = start_y + (y * new_height / original_height) - screen_w = w * new_width / original_width - screen_h = h * new_height / original_height - - cv2.rectangle( - canvas, - (int(screen_x), int(screen_y)), - (int(screen_x + screen_w), int(screen_y + screen_h)), - (255, 0, 0), - 2, - ) - def display_current_frame(self): """Display the current frame with all overlays""" if self.current_display_frame is None: @@ -718,10 +680,6 @@ class VideoEditor: display_frame ) - # Draw crop overlay - if self.crop_rect or self.crop_preview_rect: - self.draw_crop_overlay(canvas, start_x, start_y, frame_width, frame_height) - # Add info overlay rotation_text = ( f" | Rotation: {self.rotation_angle}°" if self.rotation_angle != 0 else ""