Metadata-Version: 2.4
Name: Pixslim
Version: 1.1.0
Summary: A lightweight Python package for compressing images, PDF, and DOCX files.
Author: Fatemeh Shokoohi
License: MIT
Project-URL: Homepage, https://github.com/YOUR_USERNAME/PixSlim
Project-URL: Repository, https://github.com/YOUR_USERNAME/PixSlim
Project-URL: Issues, https://github.com/YOUR_USERNAME/PixSlim/issues
Keywords: image,compress,compression,jpg,jpeg,png,webp,pdf,docx,pillow,pymupdf
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Office/Business
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: Pillow>=10.0.0
Requires-Dist: PyMuPDF>=1.23.0
Requires-Dist: python-docx>=1.1.0

# PixSlim

![Python](https://img.shields.io/badge/Python-3.9+-blue)
![Version](https://img.shields.io/badge/version-1.1.0-success)
![License](https://img.shields.io/badge/license-MIT-yellow)

**PixSlim** is a lightweight and easy-to-use Python package for compressing **images, PDF, and Microsoft Word documents** while maintaining the best possible quality.

---

# ✨ Features

| Feature              | Status |
| :------------------- | :----: |
| 🖼 Image Compression |    ✅   |
| 📄 PDF Compression   |    ✅   |
| 📝 DOCX Compression  |    ✅   |
| 🎯 Target File Size  |    ✅   |
| ⚡ Fast & Lightweight |    ✅   |
| 🐍 Python 3.9+       |    ✅   |

---

# 📦 Installation

```bash
pip install Pixslim
```

---

# 🚀 Quick Start

```python
from Pixslim import compressor

compressor = compressor(target_kb=500)

result = compressor.compress(
    "input.jpg",
    "output.jpg"
)

print(result)
```

### Example Output

```python
{
    "original_kb": 1523.45,
    "final_kb": 487.31,
    "reduction_percent": 68.01,
    "quality": 80,
    "size": (1920, 1080)
}
```

---

# 📂 Supported Formats

|  📂 Category | 📁 Formats                      | 🚀 Supported |
| :----------: | :------------------------------ | :----------: |
|   🖼 Images  | JPG, JPEG, PNG, BMP, TIFF, WEBP |       ✅      |
| 📄 Documents | PDF, DOCX                       |       ✅      |

---

# 📚 Dependencies

| 📦 Package  | Purpose                          |
| :---------- | :------------------------------- |
| Pillow      | Image compression                |
| PyMuPDF     | PDF optimization                 |
| python-docx | Microsoft Word document handling |

Install manually if needed:

```bash
pip install Pillow PyMuPDF python-docx
```

---

# 📖 API

### Create a Compressor

```python
compressor = compressor(target_kb=500)
```

### Compress a File

```python
result = compressor.compress(
    input_file="input.pdf",
    output_file="output.pdf"
)
```

---

# 📊 Return Value

PixSlim returns a dictionary like this:

```python
{
    "original_kb": 1024.55,
    "final_kb": 498.23,
    "reduction_percent": 51.37,
    "quality": 80,
    "size": (1920, 1080)
}
```

---

# 📋 Project Information

| Property     | Value            |
| :----------- | :--------------- |
| Package Name | Pixslim          |
| Version      | 1.1.0            |
| Python       | 3.9+             |
| License      | MIT              |
| Author       | Fatemeh      SHM |

---

# 📄 License

This project is licensed under the **MIT License**.

---

## 🌟 More Projects

If you enjoy Pixslim , you might also like this project ,too:

### snapforge

A lightweight, fast and intuitive Python library for image processing built on top of Pillow.

---

# ❤️ About

Thank you for using **PixSlim**.

If PixSlim helps you, consider sharing it with other Python developers.

---

# Author

**Fatemeh SHM**
