Skip to main content

Générateur de GIFs animés 1 bit pour écrans OLED (SteelSeries, SSD1306, ...)

Project description

oled-gif-studio

Lire en français

OLED GIF STUDIO scrolling on a 128x40 screen

1-bit animated GIF generator for small OLED screens: SteelSeries keyboards/mice, SSD1306/SH1106 modules (Arduino, Raspberry Pi, QMK macropads)...

No AI model, no paid API: everything is procedural (Python + Pillow), so it's instant, free, and pixel-perfect. A "natural language description" mode (French or English) picks the effect and parameters for you.

All previews in this README are scaled ×3 — the actual GIF size is that of the target screen (128×40 by default).

Installation

None needed if Python (≥ 3.10) + Pillow are already installed. Otherwise:

pip install Pillow

Optional, to get the oledgif command available everywhere:

pip install -e .

Quick usage

# From the project folder:
python -m oledgif "HELLO WORLD"                          # auto effect → hello.gif
python -m oledgif "GG" -e slot -o gg.gif                 # slot machine
python -m oledgif "PWNED" -e glitch -p rival             # for a mouse's OLED
python -m oledgif "42" -e matrix --size 128x64 --fps 20  # custom size

# In natural language:
python -m oledgif -d "the text 'HELLO' scrolling slowly"
python -m oledgif -d "'GAME OVER' blinking fast for 3s"
python -m oledgif -d "a radar sweeping the screen"

# From an image:
python -m oledgif -i photo.jpg --fit cover               # full-screen photo, vhs effect
python -m oledgif -i comic.jpg --fit cover --style comic # illustration/comic
python -m oledgif -i logo.png -e bounce                  # the logo bounces
python -m oledgif -i meme.gif                            # animated GIF converted as-is

# Text-free patterns (screensavers):
python -m oledgif -e starfield
python -m oledgif -e plasma --seconds 6

# One example of every effect in ./samples:
python -m oledgif --demo

Text / image effects (--list-effects)

scroll
scroll — perfectly looping scroll
typewriter
typewriter — typewriter with cursor
wave
wave — letters waving
blink
blink — blinking
bounce
bounce — DVD-logo-style bounce
matrix
matrix — character rain revealing the text
slot
slot — each letter cycles then locks in
glitch
glitch — shifted bands + noise
pulse
pulse — heartbeat
vhs
vhs — VHS tape tracking look
slide
slide — bottom-to-top credits crawl

typewriter, wave, matrix, and slot are text-only; the others also accept an image (--image).

--effect auto (default): scroll if the text is too wide for the screen, otherwise wave; vhs for an image; direct conversion for an animated GIF.

Text-free patterns (screensavers)

starfield
starfield — hyperspace
plasma
plasma — retro dithered plasma
life
life — Conway's Game of Life
eq
eq — audio equalizer
scope
scope — oscilloscope
radar
radar — sweep with echoes

Images: the 4 rendering styles

Converting a color image to 1 bit over 5120 pixels is an exercise in sacrifice — the right --style depends on the source. Demonstrated on the same scene (moon, silhouettes against a gradient sky, city lights):

Render Style
source Source (grayscale)
photo --style photo (default) — auto-contrast + sharpening + Floyd-Steinberg dithering. The right choice for real photos: the dithering simulates grayscale levels. On an illustration it turns into noise.
solid --style solid — hard thresholding (alias --no-dither). Great for logos and line art… but anything dark-on-dark disappears into black.
comic --style comic — like solid, but an automatic 2nd threshold (Otsu) separates dark tones and outlines shapes drowned in black with a white contour. Ideal for illustrations/comics.
edges --style edges — edge detection, white lines on black background. Neon/wireframe look, often the most readable for a landscape or a face.

Other image options:

  • --fit cover — the image fills the whole screen (cropped) instead of being shrunk to a stamp in the middle. Recommended for landscape photos.
  • Denoising (on by default): a median filter plus isolated-pixel removal eliminate "salt and pepper" noise (reflections, streetlights, stars). --no-denoise disables it if you actually want to keep those specks.
  • An animated GIF input is converted frame by frame, keeping the original durations (with --effect auto).

Natural language (--describe)

python -m oledgif -d "the text 'BRB' bouncing for 5 seconds"
python -m oledgif -d "'REC' in vintage vhs mode"
python -m oledgif -d "un radar qui balaie l'écran"

The parser (FR/EN, accent-insensitive) recognizes the effect by keywords ("scrolls", "blinks", "types", "radar", "vintage"...), the text in quotes, the duration ("for 3s"), and the speed ("slowly", "fast").

Preconfigured screens (--list-presets)

Preset Size Hardware
apex (default) 128×40 SteelSeries Apex 5 / 7 / Pro (keyboard OLED)
rival 128×36 SteelSeries Rival 700 / 710 (mouse OLED)
oled-128x64 128×64 SSD1306 / SH1106 / SSD1309
oled-128x32 128×32 SSD1306
oled-96x16 96×16 SSD1306
oled-256x64 256×64 SSD1322

Any other size: --size WIDTHxHEIGHT.

Useful options

  • --charset alnum|digits|upper|letters|ascii or a literal string — the character set used by matrix and slot (default: the 62 alphanumeric characters 0-9A-Za-z).
  • --font path.ttf --font-size N — custom font (default: Consolas, size adjusted to the screen).
  • --invert — black on white.
  • --scale 4 — GIF enlarged ×4 (for comfortable previewing).
  • --seed 42 — reproducible rendering for random effects.
  • --fps, --seconds, --speed (px/s for scroll).

Sending the GIF to a SteelSeries screen

Two options:

  1. SteelSeries GG: in your keyboard's settings (OLED section), you can import a 128×40 image/GIF — the GIFs generated here are already in the right format (1 bit, exact size).
  2. GameSense API (programmatic): like SteelseriesAnimGif does, you can stream frames to the screen via SteelSeries GG's local API. The GIFs produced here are directly usable frame by frame.

Project structure

oledgif/
  cli.py        # command line + make_gif()
  effects.py    # the 11 text/image effects (@effect registry)
  patterns.py   # the 6 text-free patterns
  render.py     # image prep, binarization, GIF writing
  describe.py   # FR/EN natural language parser
  presets.py    # market screen sizes
  fonts.py      # font loading
samples/        # one example GIF per effect (actual size, --demo)
docs/           # README illustrations (scaled ×3)

My pick

source

Ninja Turtles!

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

oledgifstudio-0.1.2.tar.gz (23.3 kB view details)

Uploaded Source

Built Distribution

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

oledgifstudio-0.1.2-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file oledgifstudio-0.1.2.tar.gz.

File metadata

  • Download URL: oledgifstudio-0.1.2.tar.gz
  • Upload date:
  • Size: 23.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for oledgifstudio-0.1.2.tar.gz
Algorithm Hash digest
SHA256 201688ee7d2f95e480a6005dc7a9414afa0e8c5076b263beabc0d170b5af5c30
MD5 7a7cd56b2d76928c03333f287c735c22
BLAKE2b-256 72dc2a53ebd760422ab26d978bf5ec82eb638ab68ca61789bd405dce937c5000

See more details on using hashes here.

Provenance

The following attestation bundles were made for oledgifstudio-0.1.2.tar.gz:

Publisher: python-publish.yml on MaticeMrll/oled-gif-studio

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

File details

Details for the file oledgifstudio-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: oledgifstudio-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 22.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for oledgifstudio-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d78fa223857a6cb5b8ade13e95db1dba48b7ed9a5529585bf3392b9afd4f3db1
MD5 429d8871402527451f1d22b349f9a973
BLAKE2b-256 109b61a89309c7505a49b0fc724c4c29d5664edb9a36b558268683a60578d488

See more details on using hashes here.

Provenance

The following attestation bundles were made for oledgifstudio-0.1.2-py3-none-any.whl:

Publisher: python-publish.yml on MaticeMrll/oled-gif-studio

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