Skip to main content

gifing

A lightweight python tool for creating GIF


Quick start

Let's make a GIF with these images:

from gifing import GIF

path = "tests/img/image"
path_to_files = [f"{path}1.jpg", f"{path}2.jpg", f"{path}3.jpg",]

gif = GIF(
  path_to_files,
  frame_duration=500,      # in ms
  n_repeat_last_frame=3,   # 500x3
)
gif.set_background_color("red")
gif.set_size((900, 700), scale=1.2)
gif.make("img/output.gif")

This package offers:

  • a streamlined approach to creating GIF
  • automatic image resizing
  • ability to set a background color during resizing

It's a basic prototype of the functionality I envision for this tool. The API is still unstable.


Installation

Install directly via pip (requires Python >=3.9):

pip install gifing



Usage

Import the GIF class and provide a list of image file paths:

from gifing import GIF

path = "tests/img"
gif = GIF(
    [f"{path}/image{i}.jpg" for i in range(1, 4)],
    frame_duration=800,  # Duration per frame (in milliseconds)
    n_repeat_last_frame=3,  # Repeat last frame 3x longer
)

You can set a background color, which is useful if your images have varying sizes:

gif.set_background_color("black")

You can also set a custom size for your GIF. The set_size method allows you to specify a target size and scale factor:

gif.set_size((300, 800), scale=2) # (600px, 1600px)

Finally, call the make() method to generate the GIF:

gif.make("path/to/output/file.gif")

If not specified, by default, the GIF will be saved as output.gif.

Metadata

Release files for gifing 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gifing 0.1.1
File Size Uploaded
gifing-0.1.1.tar.gz 5.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for gifing 0.1.1
File Interpreter ABI Platform
gifing-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 5.4 MB

Release files / gifing-0.1.1.tar.gz

Download URL gifing-0.1.1.tar.gz
Size 5.4 MB
Tags Source
SHA-256 checksum
How to use checksums
4d9aec2bd033f913c81a2cc34acd778f8ddb151cc48f6f6fb7c110508178fb5d
BLAKE2b-256 checksum
How to use checksums
990fcec460def26d663e624efb117a10478adbd01edd889d1f5e704b530db394
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 May 24, 2025.

Transparency log

Release files / gifing-0.1.1-py3-none-any.whl

Download URL gifing-0.1.1-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7eca76587dfcfc2ff449b4a56c5f663b3a389c1d67afc43aceceb4b803931c0f
BLAKE2b-256 checksum
How to use checksums
7be312bc273cbe9001c355514040a00e7842fad112f55f95737b5f691b70df3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 May 24, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page