✨ 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
# Using pip
pip install imgif
# Using uv (recommended for development)
uv pip install imgif
🚀 Quick Start
Python API
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
# 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
🛠️ Development
Setup
# 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
# 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
# Check code
ruff check .
# Format code
ruff format .
🤝 Contributing
Contributions are welcome! Please check out our Contributing Guide for details.
🙏 Acknowledgments
Release files for imgif 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| imgif-0.2.2.tar.gz | 116.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| imgif-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 129.9 kB
Release files / imgif-0.2.2.tar.gz
| Download URL | imgif-0.2.2.tar.gz |
|---|---|
| Size | 116.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3500287ef76daf38779efddc9503840885b3fbd7e9a31dbf82a0689e28de3e25
|
|
BLAKE2b-256 checksum How to use checksums |
ea5cf3b525718d53b49707e467e058a07e9e3cfdf60430d24c119dfc1403d758
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2025.
Transparency logRelease files / imgif-0.2.2-py3-none-any.whl
| Download URL | imgif-0.2.2-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a9ccf2bdeff65b0105befb89728fac58f4c558f12e0926fbb355333e580f917e
|
|
BLAKE2b-256 checksum How to use checksums |
a6bb229edde78f25d5314589c046569f6361e6ed0a16ddc43209ab14f98c2513
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2025.
Transparency log