Metadata-Version: 2.4
Name: snapforge
Version: 2.1.0
Summary: Powerful and fast image editor! 😎
Author: Ali.Shm
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: Pillow>=9.0.0
Requires-Dist: requests>=2.25.0
Requires-Dist: packaging>=20.0

# 📸 SnapForge

[![PyPI](https://img.shields.io/pypi/v/snapforge)](...)
[![Python](https://img.shields.io/pypi/pyversions/snapforge)](...)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](...)
[![Downloads](https://img.shields.io/pypi/dm/snapforge)](...)
[![Made with Pillow](https://img.shields.io/badge/Built%20With-Pillow-blue)](...)
[![Status](https://img.shields.io/badge/status-active-success)](...)

> **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`:
```bash
pip install snapforge
```

## 🚀 Quick Start

Here is a quick example to get you started with SnapForge:
```bash
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**
