Skip to content

Releases

v2.0.0

Choose a tag to compare

@NatLee NatLee released this 04 Nov 00:40
463d9c4

A big cleanup of the batch cropper: it installs with pip, fixes the crashes people hit, and lets you fine-tune the box before anything gets cropped.

Install

pip install "git+https://github.com/NatLee/batch-crop-images@v2.0.0"
batch-crop --input_path ./photos --output_path ./cropped

python main.py --input_path … --output_path … from a clone still works, with the same default folders and JPEG quality 95.

Two changes you'll notice

  • Releasing the mouse no longer crops straight away. Adjust the box, then press Enter (or Space, or double-click inside the box) to crop the batch. That's why this is 2.0.0.
  • A missing input folder now exits with code 2 instead of 255, like every other usage error.

Fixed

  • Dragging a box from right to left produced an empty crop and crashed (#2).
  • q never actually quit.
  • Upper-case .JPG files were ignored, and a folder with only those crashed.
  • Nested output folders weren't created.
  • It didn't start on systems without Tk.
  • On Windows, paths with non-ASCII characters couldn't be read; transparency, EXIF and ICC profiles were dropped.
  • "The first image" wasn't picked in sorted order.

New in the cropping window

  • Drag the box to move it, drag its corners to resize.
  • Arrow keys nudge by a pixel, E lets you type exact numbers, R locks the aspect ratio (or start with --aspect).
  • + / - zoom, and the window can be resized.

New on the command line

  • --box, --save-preset, --preset: re-run the same crop without opening the window.
  • --mismatch stretch|scale|anchor|skip for images of a different size. The default still asks per image, but now asks everything before writing a single file.
  • --recursive, --dry-run, --skip-existing, --jobs, and a progress bar.

Linux tip: OpenCV's window on Linux zooms with the mouse wheel by itself and then left-drag pans, which fights with drawing the box — use + / - to zoom instead.

Tested on Linux, Windows and macOS with Python 3.10 and 3.14.

v1.0.1

Choose a tag to compare

@NatLee NatLee released this 14 Sep 02:57

Full Changelog: v1.0.0...v1.0.1

  • Add scale checking between monitor resolution and image size

v1.0.0

Choose a tag to compare

@NatLee NatLee released this 14 Sep 02:56

Full Changelog: https://github.com/NatLee/Batch-crop-images/commits/v1.0.0

This is the first release version with the basic cropping functions.