A simple package for image compression
Project description
Image Optimizer Samuellachisa
A simple and safe image compression tool using the Pillow library.
Installation
pip install image-optimizer-samuellachisa
Usage
from image_optimizer import compress_image, compare_sizes
# Compress an image
compressed_path = compress_image("input.jpg", "output.jpg", quality=70, max_width=800)
# Get stats
stats = compare_sizes("input.jpg", compressed_path)
print(f"Reduced size by {stats['reduction_percent']:.2f}%")
Features
- Resizing while maintaining aspect ratio.
- Quality adjustment.
- Safety check: avoids saving if the compressed file is larger than the original.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 image_optimizer_samuellachisa-0.1.1-py3-none-any.whl.
File metadata
- Download URL: image_optimizer_samuellachisa-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
600243220c7491a7611b8c10043ae759f334ac8602b190c9d181d28b166deced
|
|
| MD5 |
be7860670734743e63b7cbe7f44d6abb
|
|
| BLAKE2b-256 |
072b087db69e0b5688a1757157413c21bdba73cbbd61274d50a5cf14428e82fa
|