Skip to main content

📸 SnapForge

PyPI Python License Downloads Made with Pillow Status

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 with a clean, chainable API.

✨ 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.

  • 🔗 Chainable API: Build powerful image processing pipelines with clean and readable method chaining.

  • 📷 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.

📦 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 SnapForge

(
    SnapForge("photo.jpg")
    .resize(800, 600)
    .apply_grayscale(1.0)
    .add_text("SnapForge", (30, 30))
    .optimize(85)
    .save("result.jpg")
)

print("Image processed successfully!")

📦 Available Methods

Here is the complete list of all available methods in SnapForge:

⚙️ Core

Method Description Example
.convert(fmt) Change image format (PNG, JPG, WEBP...) .convert("PNG")
.resize(w, h) Change image dimensions .resize(800, 600)
.thumbnail(w, h) Resize while keeping aspect ratio .thumbnail(500, 500)
.fit(w, h) Resize and crop to exact dimensions .fit(1080, 1080)
.crop(l, t, r, b) Crop image .crop(0, 0, 100, 100)
.rotate(a) Rotate image .rotate(90)
.optimize(q) Set JPEG quality .optimize(85)
.save(name) Save image .save("result.jpg")

💡 Lighting

Method Description Example
.apply_brightness(f) Adjust brightness .apply_brightness(1.2)
.apply_contrast(f) Adjust contrast .apply_contrast(1.5)
.adjust_gamma(g) Correct image gamma .adjust_gamma(1.3)
.auto_enhance() Improve brightness, contrast and sharpness .auto_enhance()
.invert() Invert image colors .invert()

🎨 Filters

Method Description Example
.apply_sepia() Classic sepia effect .apply_sepia()
.apply_grayscale(f) Convert to grayscale .apply_grayscale(1.0)
.apply_blur(r) Gaussian blur .apply_blur(5.0)
.apply_sharpen(f) Sharpen image .apply_sharpen(1.0)
.apply_camscanner() Document scanner effect .apply_camscanner()
.apply_preset(name) Apply a professional preset .apply_preset("vintage")
.double_exposure(img2, mode) Blend with another image .double_exposure("layer.png", "blend")

✨ Extras

Method Description Example
.flip(dir) Flip image .flip("horizontal")
.add_watermark(path) Add watermark .add_watermark("logo.png")
.add_text(text, pos) Draw text .add_text("Hello!", (50, 50))
.add_border(size, color) Add border .add_border(10, (0, 0, 0))
.round_corners(radius) Round image corners .round_corners(40)

📊 Analysis

Method Description Example
.histogram() Generate histogram data .histogram()
.compare() Display metadata and processing summary .compare()
.extract_color_palette() Get dominant colors as Hex codes .extract_color_palette()

🛠️ 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 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snapforge 2.1.0
File Size Uploaded Provenance
snapforge-2.1.0.tar.gz 9.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for snapforge 2.1.0
File Interpreter ABI Platform
snapforge-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.1 kB

Release files / snapforge-2.1.0.tar.gz

Download URL snapforge-2.1.0.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f92a1cd1778a33b12ea4da85eea61a50de6c5c02298d6d5d86447ed7365f7a42
BLAKE2b-256 checksum
How to use checksums
1be1b47bb47ee8c8c2dac9390a3e10a3da521f02c21ccfa0bc8af25af15db5df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / snapforge-2.1.0-py3-none-any.whl

Download URL snapforge-2.1.0-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a366bb3e173aeddd45916452b6e445be73e56b84ecefc692834ebadda96dda6
BLAKE2b-256 checksum
How to use checksums
4d85d4a8bc03a120c55a9179e4637b4f310bbee6b6dcf8d2d80f83ce3f3cdbff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Security for snapforge 2.1.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page