Skip to content

br3ndonland/crp

crp

Tools for cropping images.

PyPI coverage ci Ruff

Description

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.

Installation

  • pip
    • Install with python -m pip install crp from within a virtual environment
    • Invoke with crp or python -m crp
  • pipx
    • Install CLI with pipx install crp and invoke with crp
    • Run without installing CLI with pipx run crp
  • uv
    • Install CLI with uv tool install crp and invoke with crp
    • Run without installing CLI with uvx crp

Usage

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.

Related

About

Tools for cropping images.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages