An open API service indexing awesome lists of open source software.

https://github.com/atick-faisal/img2gif

๐ŸŽฌ A playful Python library for converting image sequences into animated GIFs
https://github.com/atick-faisal/img2gif

cli gif image-processing package pip pypi python

Last synced: 6 months ago
JSON representation

๐ŸŽฌ A playful Python library for converting image sequences into animated GIFs

Awesome Lists containing this project

README

          

Support Palestine

imgif_banner








> โœจ A playful Python library for converting image sequences into animated GIFs with ease!

Turn your image sequences into delightful animated GIFs with just a few lines of code. Whether you're creating animations from screenshots, visualizing data, or just having fun, `imgif` makes it simple and enjoyable! ๐Ÿš€

## ๐ŸŒŸ Features

- ๐ŸŽจ **Simple API** - Convert images to GIF in just 3 lines of code
- โšก **Fast & Efficient** - Built on Pillow for optimal performance
- ๐ŸŽ›๏ธ **Highly Configurable** - Control duration, quality, size, and more
- ๐Ÿ’ป **CLI Interface** - Use directly from the command line
- ๐Ÿ“ **Fully Typed** - Complete type annotations for great IDE support
- ๐Ÿงช **100% Test Coverage** - Reliable and well-tested
- ๐ŸŽญ **Rich Output** - Beautiful progress indicators and error messages

## ๐Ÿ“ฆ Installation

```bash
# Using pip
pip install imgif

# Using uv (recommended for development)
uv pip install imgif
```

## ๐Ÿš€ Quick Start

### Python API

```python
from img2gif import ImageToGifConverter

# Create converter
converter = ImageToGifConverter()

# Convert images to GIF
converter.convert(
input_dir="./my_images",
output_path="./output.gif",
duration=0.5, # seconds per frame
)

print("๐ŸŽ‰ GIF created successfully!")
```

### Command Line

```bash
# Basic usage
imgif ./my_images output.gif

# With options
imgif ./my_images output.gif --duration 0.5 --loop 0

# See all options
imgif --help
```

## ๐Ÿ“– Documentation

Full documentation is available at [imgif.readthedocs.io](https://imgif.readthedocs.io)

## ๐Ÿ› ๏ธ Development

### Setup

```bash
# Clone the repository
git clone https://github.com/atick-faisal/img2gif.git
cd img2gif

# Install dependencies using uv
uv sync

# Install pre-commit hooks
pre-commit install
```

### Running Tests

```bash
# Run tests on default Python version
hatch run test:all

# Run tests on all supported Python versions
hatch run test:all

# Run with coverage
hatch run test:cov
```

### Linting & Formatting

```bash
# Check code
ruff check .

# Format code
ruff format .
```

## ๐Ÿค Contributing

Contributions are welcome! Please check out our [Contributing Guide](CONTRIBUTING.md) for details.

## ๐Ÿ™ Acknowledgments

- Built with [Pillow](https://pillow.readthedocs.io/) ๐Ÿ“ธ
- CLI powered by [click](https://click.palletsprojects.com/) ๐Ÿ–ฑ๏ธ
- Beautiful output by [rich](https://rich.readthedocs.io/) ๐Ÿ’Ž