📸 SnapForge
SnapForge is a lightweight, fast, and intuitive Python library designed for easy image processing tasks. Whether you need to resize, convert, or manipulate images, SnapForge makes it a breeze!
✨ Features
- 🚀 Fast & Lightweight: Minimal overhead for quick image tasks.
- 🔄 Format Conversion: Easily switch between JPEG, PNG, BMP, 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.
📦 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:
import snapforge
# Load an image
img = snapforge.Snapforge("example.jpg")
# Resize the image
resized_img = img.resize(800,600)
# Convert and save the image
resized_img.convert("PNG").save("example_resized.png")
print("Image processed successfully!")
## 🧾 Feature Showcase (Full Reference)
Here is the complete list of all available methods in SnapForge:
| Category | Method | Description | Example |
| :--- | :--- | :--- | :--- |
| **Core** | `.convert(fmt)` | Change image format (e.g., PNG, JPG) | `.convert("PNG")` |
| | `.resize(w, h)` | Change image dimensions | `.resize(800, 600)` |
| | `.crop(l, t, r, b)` | Crop image to specific boundaries | `.crop(0, 0, 100, 100)` |
| | `.rotate(a)` | Rotate image by angle | `.rotate(90)` |
| | `.optimize(q)` | Set compression quality (1-100) | `.optimize(85)` |
| | `.save(name)` | Save the final forged image | `.save("result.jpg")` |
| **Lighting** | `.apply_brightness(f)` | Adjust brightness (factor > 1.0 is brighter) | `.apply_brightness(1.2)` |
| | `.apply_contrast(f)` | Adjust contrast (factor > 1.0 is higher) | `.apply_contrast(1.5)` |
| **Filters** | `.apply_sepia()` | Apply a classic vintage sepia effect | `.apply_sepia()` |
| | `.apply_grayscale(f)` | Convert to black & white (0.0 to 1.0) | `.apply_grayscale(1.0)` |
| | `.apply_blur(r)` | Apply Gaussian blur with radius r | `.apply_blur(5.0)` |
| | `.apply_sharpen()` | Enhance image sharpness/clarity | `.apply_sharpen()` |
| | `.apply_camscanner()`| Apply document scanner effect (B&W/Threshold) | `.apply_camscanner()` |
| **Extras** | `.flip(dir)` | Flip image (horizontal or vertical) | `.flip("horizontal")` |
| | `.add_watermark(p)` | Add a watermark image | `.add_watermark("logo.png")` |
🛠️ Requirements
Python: 3.7 or higher
Dependencies: Pillow
🤝 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.
📜 License
Distributed under the MIT License.
👤 Author
Ali.Shm
Project Maintainer
Metadata
Release files for snapforge 1.2.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-1.2.0.tar.gz | 5.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| snapforge-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.6 kB
Release files / snapforge-1.2.0.tar.gz
| Download URL | snapforge-1.2.0.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b08ef8b695cd12a2c48a0d20420f11b5ca4da381624988abbda73b48ca6a053
|
|
BLAKE2b-256 checksum How to use checksums |
2c26030e2a9cf8a07aec7c2d1de4587882c00911f0901f6631b338c28797185d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Release files / snapforge-1.2.0-py3-none-any.whl
| Download URL | snapforge-1.2.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
060e62d83c11973f4f465fc43e3d80aa394dc4a6581ecff685a07e58f19d87a0
|
|
BLAKE2b-256 checksum How to use checksums |
b38cd3d24fdc0cc389e96eb4e26c9b1c35715b91397653f636b70be5ddabdea8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Security for snapforge 1.2.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.