Vimify the cropping

This commit is contained in:
2025-09-04 16:52:34 +02:00
parent 1f823a7465
commit df103e4070

View File

@@ -1327,27 +1327,27 @@ class VideoEditor:
self.render_video(str(self.video_path.parent / output_name)) self.render_video(str(self.video_path.parent / output_name))
# Individual direction controls using shift combinations we can detect # Individual direction controls using shift combinations we can detect
elif key == ord("I"): # Shift+i - expand up elif key == ord("J"): # Shift+i - expand up
self.adjust_crop_size('up', False) self.adjust_crop_size('up', False)
print(f"Expanded crop upward by {self.crop_size_step}px") print(f"Expanded crop upward by {self.crop_size_step}px")
elif key == ord("K"): # Shift+k - expand down elif key == ord("K"): # Shift+k - expand down
self.adjust_crop_size('down', False) self.adjust_crop_size('down', False)
print(f"Expanded crop downward by {self.crop_size_step}px") print(f"Expanded crop downward by {self.crop_size_step}px")
elif key == ord("J"): # Shift+j - expand left elif key == ord("L"): # Shift+j - expand left
self.adjust_crop_size('left', False) self.adjust_crop_size('left', False)
print(f"Expanded crop leftward by {self.crop_size_step}px") print(f"Expanded crop leftward by {self.crop_size_step}px")
elif key == ord("L"): # Shift+l - expand right elif key == ord("H"): # Shift+l - expand right
self.adjust_crop_size('right', False) self.adjust_crop_size('right', False)
print(f"Expanded crop rightward by {self.crop_size_step}px") print(f"Expanded crop rightward by {self.crop_size_step}px")
# Contract in specific directions # Contract in specific directions
elif key == ord("i"): # i - contract from bottom (reduce height from bottom) elif key == ord("k"): # i - contract from bottom (reduce height from bottom)
self.adjust_crop_size('up', True) self.adjust_crop_size('up', True)
print(f"Contracted crop from bottom by {self.crop_size_step}px") print(f"Contracted crop from bottom by {self.crop_size_step}px")
elif key == ord("k"): # k - contract from top (reduce height from top) elif key == ord("j"): # k - contract from top (reduce height from top)
self.adjust_crop_size('down', True) self.adjust_crop_size('down', True)
print(f"Contracted crop from top by {self.crop_size_step}px") print(f"Contracted crop from top by {self.crop_size_step}px")
elif key == ord("j"): # j - contract from right (reduce width from right) elif key == ord("h"): # j - contract from right (reduce width from right)
self.adjust_crop_size('left', True) self.adjust_crop_size('left', True)
print(f"Contracted crop from right by {self.crop_size_step}px") print(f"Contracted crop from right by {self.crop_size_step}px")
elif key == ord("l"): # l - contract from left (reduce width from left) elif key == ord("l"): # l - contract from left (reduce width from left)