Python image toolkit — resize, crop, rotate, convert, compress, blur, sharpen, watermark, and 12 more operations. Powered by Pillow.
Project description
peasy-image
Python image toolkit — resize, crop, rotate, compress, convert, blur, sharpen, watermark, and 12 more operations. Powered by Pillow.
Every function accepts bytes | Path | str and returns bytes — works with files, HTTP responses, and in-memory buffers.
Try the interactive tools at peasyimage.com
Install
pip install peasy-image # Core (Pillow)
pip install "peasy-image[cli]" # + CLI (typer, rich)
pip install "peasy-image[mcp]" # + MCP server
pip install "peasy-image[all]" # Everything
Quick Start
from peasy_image import resize, compress, info, convert
# Resize maintaining aspect ratio
resized = resize("photo.jpg", width=800)
# Compress to JPEG at quality 60
compressed = compress("photo.png", quality=60, fmt="jpeg")
# Convert to WebP
webp = convert("photo.jpg", fmt="webp")
# Get image info
meta = info("photo.jpg")
print(f"{meta.width}x{meta.height} {meta.format} ({meta.file_size / 1024:.0f} KB)")
Operations
| Function | Description |
|---|---|
resize |
Resize with aspect ratio preservation |
crop |
Crop to bounding box (left, top, right, bottom) |
rotate |
Rotate by angle with optional canvas expansion |
flip |
Flip horizontal, vertical, or both |
compress |
Reduce file size via quality adjustment |
convert |
Convert between PNG, JPEG, WebP, GIF, BMP, TIFF |
grayscale |
Convert to grayscale |
blur |
Gaussian blur |
sharpen |
Sharpen with adjustable factor |
brightness |
Adjust brightness |
contrast |
Adjust contrast |
invert |
Invert colors |
watermark |
Add text watermark at any anchor position |
thumbnail |
Center-crop square thumbnail |
strip_metadata |
Remove all EXIF/metadata |
info |
Get dimensions, format, mode, EXIF presence |
get_exif |
Extract EXIF metadata fields |
border |
Add solid color border |
round_corners |
Apply rounded corners with transparency |
pad |
Pad to target dimensions with centering |
overlay |
Overlay one image on another |
CLI
peasy-image resize photo.jpg --width 800
peasy-image compress photo.png --quality 60
peasy-image convert photo.bmp webp
peasy-image info photo.jpg
peasy-image watermark photo.jpg "© 2026"
peasy-image thumbnail photo.jpg --size 128
MCP Server
{
"mcpServers": {
"peasy-image": {
"command": "uvx",
"args": ["--from", "peasy-image[mcp]", "python", "-m", "peasy_image"]
}
}
}
License
MIT
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 peasy_image-0.1.0.tar.gz.
File metadata
- Download URL: peasy_image-0.1.0.tar.gz
- Upload date:
- Size: 86.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07bfdac7139d504194faf590ada510c133420c3dcf72601b426643b06845ae22
|
|
| MD5 |
e34ce52c6d1bf54e13c4f1b7d6bffaea
|
|
| BLAKE2b-256 |
73cdf25596a8b6cf81d366465ccfc4dfb9aa1481765e237109c31010995e3af7
|
File details
Details for the file peasy_image-0.1.0-py3-none-any.whl.
File metadata
- Download URL: peasy_image-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d11463cd1064363bb07a16694ab1e7de89a98fe72832ebbbafc331613bfe651c
|
|
| MD5 |
1826965aef2e95ce1ed72042a718e7ea
|
|
| BLAKE2b-256 |
858f019c0e419cab70df3f5dc64d138d88e0f5e12e8c6084584f08175d800ba9
|