Skip to main content

🎬 A playful Python library for converting image sequences into animated GIFs

Project description

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

# 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

  • Built with Pillow 📸
  • CLI powered by click 🖱️
  • Beautiful output by rich 💎

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imgif-0.2.2.tar.gz (116.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

imgif-0.2.2-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file imgif-0.2.2.tar.gz.

File metadata

  • Download URL: imgif-0.2.2.tar.gz
  • Upload date:
  • Size: 116.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for imgif-0.2.2.tar.gz
Algorithm Hash digest
SHA256 3500287ef76daf38779efddc9503840885b3fbd7e9a31dbf82a0689e28de3e25
MD5 976b2cb93e57f5f597adb67ae0f4dc3e
BLAKE2b-256 ea5cf3b525718d53b49707e467e058a07e9e3cfdf60430d24c119dfc1403d758

See more details on using hashes here.

Provenance

The following attestation bundles were made for imgif-0.2.2.tar.gz:

Publisher: cd.yml on atick-faisal/img2gif

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file imgif-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: imgif-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for imgif-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a9ccf2bdeff65b0105befb89728fac58f4c558f12e0926fbb355333e580f917e
MD5 fbf72917bec50bb6e6c29aeceee6c76c
BLAKE2b-256 a6bb229edde78f25d5314589c046569f6361e6ed0a16ddc43209ab14f98c2513

See more details on using hashes here.

Provenance

The following attestation bundles were made for imgif-0.2.2-py3-none-any.whl:

Publisher: cd.yml on atick-faisal/img2gif

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page