Skip to main content

Tools for cropping images.

Project description

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

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

crp-0.0.4.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crp-0.0.4-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file crp-0.0.4.tar.gz.

File metadata

  • Download URL: crp-0.0.4.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for crp-0.0.4.tar.gz
Algorithm Hash digest
SHA256 88b1e17b0d9ebf54be0501cd306605c4b505fdc6e9bf78f12eb22b0ceea705ff
MD5 1b8dfe8e3be2dbd2a5b462bf0c75b856
BLAKE2b-256 8b94b23125e42154dab7b2e66ce9b79a9e0dfe11c841cac18bbd6704194300e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for crp-0.0.4.tar.gz:

Publisher: ci.yml on br3ndonland/crp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file crp-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: crp-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for crp-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fab288737760efb598406ac2594cc148d63819b3b23fa7af0e3b1e9cbd2ee7a1
MD5 5be5f6b53b177dc4585b92f9f8ffafa1
BLAKE2b-256 194a4aa3f705ff4a18c43e0ce0cfcac1e551f309c8a8c499f05e3d017c19b6f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for crp-0.0.4-py3-none-any.whl:

Publisher: ci.yml on br3ndonland/crp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page