๐ธ SnapForge
Forge your images with a single chain of commands.
A lightweight, fast and intuitive Python library for image processing built on top of Pillow.
Perfect for resizing, filtering, enhancing and transforming images .
โจ Features
-
๐ Fast & Lightweight: Minimal overhead for quick image tasks.
-
๐ Format Conversion: Easily switch between JPEG, PNG, BMP, TIFF and more.
-
๐ Smart Resizing: High-quality scaling and resizing capabilities.
-
๐ ๏ธ Easy API: Designed with developer experience in mindโsimple commands for complex tasks.
-
๐ Pythonic: Follows Python's best practices for a seamless integration.
-
๐ท Powered by Pillow: Uses the trusted Pillow library for reliable image processing.
-
โก Efficient Processing: Designed for smooth and practical image manipulation workflows.
-
๐งพ MIT License: Open-source and free to use in personal and commercial projects.
๐ Professional Format Converter ๐
Our Storage.convert Supports more than 8 Formats : JPEG, JPG , PNG, WEBP, GIF, TIFF, BMP, ICO and etc.
๐ฆ Installation
You can install SnapForge directly from PyPI using pip:
pip install snapforge
๐ Quick Start
Here is a quick example to get you started with SnapForge:
from snapforge import Storage , Geometry
img=Storage.load(r"C:\Users\almahdilaptop\Pictures\sharp.png")
img=Geometry.round_corners(img,40)
img=Storage.save(img,r"C:\Users\almahdilaptop\Pictures\light.png")
๐ Available Modules
SnapForge is now fully modular ๐ง โ each module has a single responsibility and can be imported independently:
from snapforge import Storage, Geometry, Effects, Overlays, Inspector, SnapForgeUpdater
- ๐ Geometry โ resizing, cropping, rotating and transforming
- ๐พ Storage โ loading, saving and format conversion
- ๐ Inspector โ metadata, histogram and color analysis
- ๐จ Effects โ lighting and filters
- ๐ผ๏ธ Overlays โ text, watermark, borders and blending
- ๐ SnapForgeUpdater โ update checks and version comparison
๐ฆ Available Methods
Here is the complete list of all available methods in each snapforge module:
๐ Geometry
| Method | Description | Example |
|---|---|---|
Geometry.resize(img, w, h) |
Change image dimensions | Geometry.resize(img, 800, 600) |
Geometry.thumbnail(img, w, h) |
Resize while keeping aspect ratio | Geometry.thumbnail(img, 500, 500) |
Geometry.fit(img, w, h) |
Resize and crop to exact dimensions | Geometry.fit(img, 1080, 1080) |
Geometry.crop(img, l, t, r, b) |
Crop image | Geometry.crop(img, 0, 0, 100, 100) |
Geometry.rotate(img, a) |
Rotate image | Geometry.rotate(img, 90) |
Geometry.flip(img, dir) |
Flip image | Geometry.flip(img, "horizontal") |
Geometry.round_corners(img, radius) |
Round image corners | Geometry.round_corners(img, 40) |
๐พ Storage
| Method | Description | Example |
|---|---|---|
Storage.load(path) |
Load image from file | Storage.load("photo.jpg") |
Storage.save(img, name) |
Save image | Storage.save(img, "result.jpg") |
Storage.convert(img, fmt) |
Change image format (PNG, JPG, WEBPโฆ) | Storage.convert(img, "PNG") |
Storage.optimize(img, q) |
Set JPEG quality | Storage.optimize(img, 85) |
๐ Inspector
| Method | Description | Example |
|---|---|---|
Inspector.get_metadata(img) |
Extract detailed image metadata | Inspector.get_metadata(img) |
Inspector.histogram(img) |
Generate histogram data | Inspector.histogram(img) |
Inspector.compare(img) |
Display metadata and processing summary | Inspector.compare(img) |
Inspector.extract_color_palette(img) |
Get dominant colors as Hex codes | Inspector.extract_color_palette(img) |
๐จ Effects (Lighting & Filters)
| Method | Description | Example |
|---|---|---|
Effects.apply_brightness(img, f) |
Adjust brightness | Effects.apply_brightness(img, 1.2) |
Effects.apply_contrast(img, f) |
Adjust contrast | Effects.apply_contrast(img, 1.5) |
Effects.adjust_gamma(img, g) |
Correct image gamma | Effects.adjust_gamma(img, 1.3) |
Effects.auto_enhance(img) |
Improve brightness, contrast and sharpness | Effects.auto_enhance(img) |
Effects.invert(img) |
Invert image colors | Effects.invert(img) |
Effects.apply_sepia(img) |
Classic sepia effect | Effects.apply_sepia(img) |
Effects.apply_grayscale(img, f) |
Convert to grayscale | Effects.apply_grayscale(img, 1.0) |
Effects.apply_blur(img, r) |
Gaussian blur | Effects.apply_blur(img, 5.0) |
Effects.apply_sharpen(img, f) |
Sharpen image | Effects.apply_sharpen(img, 1.0) |
Effects.apply_camscanner(img) |
Document scanner effect | Effects.apply_camscanner(img) |
Effects.apply_preset(img, name) |
Apply a professional preset | Effects.apply_preset(img, "vintage") |
๐ผ๏ธ Overlays
| Method | Description | Example |
|---|---|---|
Overlays.add_watermark(img, path) |
Add watermark | Overlays.add_watermark(img, "logo.png") |
Overlays.add_text(img, text, pos) |
Draw text | Overlays.add_text(img, "Hello!", (50, 50)) |
Overlays.add_border(img, size, color) |
Add border | Overlays.add_border(img, 10, (0, 0, 0)) |
Overlays.double_exposure(img, img2, mode) |
Blend with another image | Overlays.double_exposure(img, "layer.png", "blend") |
๐ SnapForgeUpdater
| Method | Description | Example |
|---|---|---|
SnapForgeUpdater.__init__(package_name, current_version) |
Initialize the updater with the package name and current version | SnapForgeUpdater("snapforge", "3.0.0") |
SnapForgeUpdater._check_logic() |
Check PyPI in the background for a newer release | updater._check_logic() |
SnapForgeUpdater._notify_user(latest_version, upload_time) |
Display a notification when a new version is available | updater._notify_user("3.0.1", "2026-08-12 10:30:00") |
SnapForgeUpdater.start_check() |
Start the update check in a background daemon thread | updater.start_check() |
๐ ๏ธ Requirements
To use SnapForge, ensure you have the following installed:
- Python: 3.7 or higher
- Dependencies:
Pillow(for image processing)requests(for automatic update checks)packaging(for version comparison logic)
๐ค Contributing
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
๐ More Projects
If you enjoy SnapForge, you might also like this project ,too:
PixSlim
A Python image and ... compression library focused on reducing file size while preserving quality.
๐ License
Distributed under the MIT License.
โค๏ธ Support
If you find SnapForge useful, your support means a lot!
You can help by:
- ๐ฆ Installing the package and trying it in your projects
- ๐ Sharing feedback and suggestions
- ๐ Reporting bugs and improvements
- ๐ Recommending SnapForge to other Python developers
๐งฉ Every piece of feedback helps make SnapForge better. ๐
๐ค Author
Ali.Shm
Project Maintainer
Metadata
Release files for snapforge 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| snapforge-3.0.0.tar.gz | 20.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| snapforge-3.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.2 kB
Release files / snapforge-3.0.0.tar.gz
| Download URL | snapforge-3.0.0.tar.gz |
|---|---|
| Size | 20.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
66db5df8de7b5dc043e0bbf139deacf851b97ad027a747af6f9d8137506524cc
|
|
BLAKE2b-256 checksum How to use checksums |
fa381c6b5b439ded1c72ce8817eb40ce3863297460caa25a6caea8797a557c2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Release files / snapforge-3.0.0-py3-none-any.whl
| Download URL | snapforge-3.0.0-py3-none-any.whl |
|---|---|
| Size | 20.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d540576a34b23b869ef203d48100652d6ecf410c532ce597fb74d7f67f6900f
|
|
BLAKE2b-256 checksum How to use checksums |
2ed86f951e18cc11272b42f96a79e1f720406537a61ec5419a5798ac1770ed90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Security for snapforge 3.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.