Tools for cropping images.
Images often need to be cropped to specific aspect ratios and dimensions for upload to sites like TheMovieDB (TMDB). TheMovieDB's image upload guidelines explain that backdrops should be in a 16:9 aspect ratio (width x height) and posters should be in a 2:3 aspect ratio. Some sites have auto-cropping features that will offer to crop images to the required dimensions during upload, but this is often not adequate. Images often need further editing beyond just brute-force auto-cropping. It's therefore helpful to have dimensions to use as a guideline when editing images.
This project provides a command-line interface (CLI) that suggests dimensions to use for cropping.
- pip
- Install with
python -m pip install crp
from within a virtual environment - Invoke with
crp
orpython -m crp
- Install with
- pipx
- Install CLI with
pipx install crp
and invoke withcrp
- Run without installing CLI with
pipx run crp
- Install CLI with
- uv
- Install CLI with
uv tool install crp
and invoke withcrp
- Run without installing CLI with
uvx crp
- Install CLI with
crp suggest --width=3940 --height 2160 backdrop # Crop to 3840 x 2160 (16:9).
crp suggest --width 1652 --height 2214 poster # Crop to 1476 x 2214 (2:3).
To see the help text, run crp --help
/crp -h
.