Enhance image and screenshot saving quality in VideoEditor

This commit updates the image and screenshot saving functionality in the VideoEditor class to use high-quality JPEG settings. The JPEG quality is set to 95, ensuring better image fidelity when saving processed frames and static images.
This commit is contained in:
2025-09-19 07:17:52 +02:00
parent 0c3e5e21bf
commit ea1a6e58f4

View File

@@ -791,8 +791,9 @@ class VideoEditor:
processed_frame = self.apply_crop_zoom_and_rotation(self.current_display_frame.copy())
if processed_frame is not None:
# Save the processed frame
success = cv2.imwrite(str(screenshot_path), processed_frame)
# Save the processed frame with high quality settings
# Use JPEG quality 95 (0-100, where 100 is highest quality)
success = cv2.imwrite(str(screenshot_path), processed_frame, [cv2.IMWRITE_JPEG_QUALITY, 95])
if success:
print(f"Screenshot saved: {screenshot_name}")
self.show_feedback_message(f"Screenshot saved: {screenshot_name}")
@@ -2716,8 +2717,8 @@ class VideoEditor:
processed_image = self.apply_crop_zoom_and_rotation(self.static_image.copy())
if processed_image is not None:
# Save the image
success = cv2.imwrite(output_path, processed_image)
# Save the image with high quality settings
success = cv2.imwrite(output_path, processed_image, [cv2.IMWRITE_JPEG_QUALITY, 95])
if success:
print(f"Image saved successfully to {output_path}")
return True