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

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.1
File Size Uploaded Provenance
snapforge-2.1.1.tar.gz 18.9 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 35.7 kB

Release files / snapforge-2.1.1.tar.gz

Download URL snapforge-2.1.1.tar.gz
Size 18.9 kB
Tags Source
SHA-256 checksum
How to use checksums
db21924f425359b99eb2c97c48c8d3723fbd4f48b046a57329027fb93772288d
BLAKE2b-256 checksum
How to use checksums
9c46ac17c8807b219b62500e1fa48ec3d064bc57c0f637e5c27ff5a71d8c63da
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.1-py3-none-any.whl

Download URL snapforge-2.1.1-py3-none-any.whl
Size 16.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c3f7db2b4c695c6213864f41c26cb8bc85eb602141ad479d670d00b57a04332
BLAKE2b-256 checksum
How to use checksums
9b4f3bfc14959d4dd4f039602436503a085b4df5d7002bee5fbbd9a3c699c045
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.1

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