Skip to main content

Create thumbnails. Specify dimensions or aspect ratio.

Project description

Thumber

This Python script takes an image and creates a composite image with the original one centered, while the background is filled with a blurred and faded version, if dimensions or aspect ratio are altered. If it follows the same aspect ratio, but dimensions are smaller, it only downscales the image. The final output will have dimensions specified by command-line arguments.

Install using pip:

pip install thumber

Usage

thumber <mode> <input_image> <final_width> <final_height> [blur_radius]

Examples:

To produce a 1920x1080 image:

thumber dimensions square.jpg 1920 1080 --blur=30

To produce an image whose width is 1.778x the height:

thumber aspect square.jpg 1.778 --blur=30

The closer to 0, the lower is the blur effect

Gallery Examples

babel.webp (1024x1024) babel-dimensions-1920x1080.webp babel-aspect-0.5.webp babel-aspect-2.webp

License

This project is licensed under the MIT License.

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

thumber-0.2.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

thumber-0.2.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file thumber-0.2.0.tar.gz.

File metadata

  • Download URL: thumber-0.2.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for thumber-0.2.0.tar.gz
Algorithm Hash digest
SHA256 49e7c1e9be144e9a92a2a3770f1355ef6eebfdaee70f74f5e1438e73fadd75be
MD5 089021b7df47c1933593e40da009674c
BLAKE2b-256 545e82065ce704d84e764387ca7ccee4cef1cf1d414f63091376b32ac6857671

See more details on using hashes here.

File details

Details for the file thumber-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: thumber-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for thumber-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 110693cecbf62b0ef91ea1c63d6443df9db23e08607443996b329239ea360298
MD5 e3aa244f2c093f9970f5035b9665ac52
BLAKE2b-256 c41f8788cb61d57ccbd29beb4c5d394eb3a15959c02026aed83873f9d8bb7ec9

See more details on using hashes here.

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