Générateur de GIFs animés 1 bit pour écrans OLED (SteelSeries, SSD1306, ...)
Project description
oled-gif-studio
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 — perfectly looping scroll |
typewriter — typewriter with cursor |
wave — letters waving |
blink — blinking |
bounce — DVD-logo-style bounce |
matrix — character rain revealing the text |
slot — each letter cycles then locks in |
glitch — shifted bands + noise |
pulse — heartbeat |
vhs — VHS tape tracking look |
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 — hyperspace |
plasma — retro dithered plasma |
life — Conway's Game of Life |
eq — audio equalizer |
scope — oscilloscope |
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 (grayscale) | |
--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. |
|
--style solid — hard thresholding (alias --no-dither). Great for logos and line art… but anything dark-on-dark disappears into black. |
|
--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. |
|
--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-denoisedisables 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|asciior a literal string — the character set used bymatrixandslot(default: the 62 alphanumeric characters0-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:
- 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).
- 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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
201688ee7d2f95e480a6005dc7a9414afa0e8c5076b263beabc0d170b5af5c30
|
|
| MD5 |
7a7cd56b2d76928c03333f287c735c22
|
|
| BLAKE2b-256 |
72dc2a53ebd760422ab26d978bf5ec82eb638ab68ca61789bd405dce937c5000
|
Provenance
The following attestation bundles were made for oledgifstudio-0.1.2.tar.gz:
Publisher:
python-publish.yml on MaticeMrll/oled-gif-studio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oledgifstudio-0.1.2.tar.gz -
Subject digest:
201688ee7d2f95e480a6005dc7a9414afa0e8c5076b263beabc0d170b5af5c30 - Sigstore transparency entry: 2130390049
- Sigstore integration time:
-
Permalink:
MaticeMrll/oled-gif-studio@d94539da75024cfda5f58d75f44c91528a156e6d -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/MaticeMrll
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d94539da75024cfda5f58d75f44c91528a156e6d -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d78fa223857a6cb5b8ade13e95db1dba48b7ed9a5529585bf3392b9afd4f3db1
|
|
| MD5 |
429d8871402527451f1d22b349f9a973
|
|
| BLAKE2b-256 |
109b61a89309c7505a49b0fc724c4c29d5664edb9a36b558268683a60578d488
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oledgifstudio-0.1.2-py3-none-any.whl -
Subject digest:
d78fa223857a6cb5b8ade13e95db1dba48b7ed9a5529585bf3392b9afd4f3db1 - Sigstore transparency entry: 2130390205
- Sigstore integration time:
-
Permalink:
MaticeMrll/oled-gif-studio@d94539da75024cfda5f58d75f44c91528a156e6d -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/MaticeMrll
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d94539da75024cfda5f58d75f44c91528a156e6d -
Trigger Event:
release
-
Statement type: