ImgWizard
ImgWizard is a Python package that simplifies image resizing and caching by interfacing with the wsrv.nl service. It supports a range of image formats and manipulations, making it an ideal tool for developers needing to dynamically adjust images in their applications.
Installation
To install ImgWizard, you can use pip:
pip install imgwizard
Usage
ImgWizard is designed to be intuitive and easy to use. Here's a quick start example:
from imgwizard import ImgWizard
img = ImgWizard('https://i.ibb.co/tHzGgg9/Screenshot-2024-03-09-at-16-00-21.png')
resized_image_url = img.resize(width=300, height=300, fit='cover').fetch()
print(resized_image_url)
This example demonstrates how to resize an image to a 300x300 dimension using the cover fit option and then fetches the URL of the processed image.
Cropping Images
You can easily crop images by specifying alignment or using a smart crop:
cropped_image_url = img.crop(alignment='top').fetch()
print(cropped_image_url)
Applying Adjustments
Apply various adjustments such as blur, contrast, and tint:
adjusted_image_url = img.apply_adjustments(blur=5, contrast=15, tint='blue').fetch()
print(adjusted_image_url)
Changing Image Format
Convert images to different formats with quality adjustments:
formatted_image_url = img.set_format(output_format='png', quality=50).fetch()
print(formatted_image_url)
Before and After Examples
Original Image:
Resized Image:
Cropped Image:
Adjusted Image:
Reformatted Image:
Features
- Supports resizing, cropping, and various image adjustments such as blur, contrast, and tint.
- Easy integration with Python projects for dynamic image manipulation.
- Leverages the global caching and delivery capabilities of Cloudflare via
wsrv.nl.
Contributing
Your contributions are welcome! If you have suggestions or issues, please feel free to open an issue or submit a pull request on the GitHub repository.
License
ImgWizard is available under the MIT License. Feel free to use it in your projects and contribute back to the open-source community.
Metadata
Release files for imgwizard 2025.5.100908
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| imgwizard-2025.5.100908.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| imgwizard-2025.5.100908-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.8 kB
Release files / imgwizard-2025.5.100908.tar.gz
| Download URL | imgwizard-2025.5.100908.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84cf7d9a64c7c59c03ff5466d76e8575725c9cd2973df5d666d56edbc1e1474c
|
|
BLAKE2b-256 checksum How to use checksums |
6eb113c3ab48bbd5310629431cd1de5bf699a0c892d2ae2253247195ebaa0f09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.11
|
Release files / imgwizard-2025.5.100908-py3-none-any.whl
| Download URL | imgwizard-2025.5.100908-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66473074b21b923291f7a7deb1f633bab053d1a8ea6be7cc161a072e2f14ae09
|
|
BLAKE2b-256 checksum How to use checksums |
4a5fe793663463239cca9810def42a53d0e095993e084dcfb037d6d3019ea892
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.11
|