Tools for cropping images.
Project description
crp
Tools for cropping images.
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 crpfrom within a virtual environment - Invoke with
crporpython -m crp
- Install with
- pipx
- Install CLI with
pipx install crpand invoke withcrp - Run without installing CLI with
pipx run crp
- Install CLI with
- uv
- Install CLI with
uv tool install crpand invoke withcrp - Run without installing CLI with
uvx crp
- Install CLI with
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crp-0.0.5.tar.gz.
File metadata
- Download URL: crp-0.0.5.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2610516fbba0be5a282d9c4ac75df4bf71c3fc3064b39b54f447ef7c7133ef2
|
|
| MD5 |
c8911036e06b0eaa85e9191810914a7b
|
|
| BLAKE2b-256 |
d610da092af84632f272fa5f4588140d75ea4f4f094ce8734e28efe002ead888
|
Provenance
The following attestation bundles were made for crp-0.0.5.tar.gz:
Publisher:
ci.yml on br3ndonland/crp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crp-0.0.5.tar.gz -
Subject digest:
c2610516fbba0be5a282d9c4ac75df4bf71c3fc3064b39b54f447ef7c7133ef2 - Sigstore transparency entry: 854734326
- Sigstore integration time:
-
Permalink:
br3ndonland/crp@941eda3c1b5be1e4a533477335a27e0f1bab0d9e -
Branch / Tag:
refs/tags/0.0.5 - Owner: https://github.com/br3ndonland
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@941eda3c1b5be1e4a533477335a27e0f1bab0d9e -
Trigger Event:
push
-
Statement type:
File details
Details for the file crp-0.0.5-py3-none-any.whl.
File metadata
- Download URL: crp-0.0.5-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1410993f21554b5f31d6d0fab9a543a4bdb24b33d2aa3dc89372610ac95fb89
|
|
| MD5 |
9261f4c8ce9498a08c71af80cfec5fe3
|
|
| BLAKE2b-256 |
1faac8fb49d8e1c6a9444f569853bfaec5d2d475920406aa5bd6f18e9125d099
|
Provenance
The following attestation bundles were made for crp-0.0.5-py3-none-any.whl:
Publisher:
ci.yml on br3ndonland/crp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crp-0.0.5-py3-none-any.whl -
Subject digest:
c1410993f21554b5f31d6d0fab9a543a4bdb24b33d2aa3dc89372610ac95fb89 - Sigstore transparency entry: 854734328
- Sigstore integration time:
-
Permalink:
br3ndonland/crp@941eda3c1b5be1e4a533477335a27e0f1bab0d9e -
Branch / Tag:
refs/tags/0.0.5 - Owner: https://github.com/br3ndonland
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@941eda3c1b5be1e4a533477335a27e0f1bab0d9e -
Trigger Event:
push
-
Statement type: