π¦ gifmeta
gifmeta is a small, focused tool for inspecting and modifying GIF metadata.
Itβs designed for developers, artists, and anyone needing loop control and timing tweaks β fast and reliably.
β€οΈ Built with Rust. Sacredly simple. Zero bloat.
π§ββοΈ Why I Built This
Because changing loop count or frame delays in GIFs was a pain.
Most tools were too heavy, too raw, or lacked reliable preview/testing.
gifmeta was born to fix that β with precise CLI commands, minimalism, and full test coverage.
π§ Features
- π Set infinite or fixed loop count (
--loop-count) - β±οΈ Apply fixed delay to all frames (
--delay) - π― Set specific frame delays (
--delays 1=30,4=60) - π€ Output JSON metadata (
--json) - πΌοΈ Extract any frame as PNG (to file or base64)
- π§ͺ CLI + doc tests for core functions
- πΌοΈ Side-by-side visual preview reports via
run-visual-preview.sh
πββοΈ Why Not Use gifsicle or gif-rs?
You can β and should, if you need full encoding pipelines.
But gifmeta wraps just the things most of us need quickly:
- π Loop control (infinite or fixed)
- β± Frame delay override (global + selective)
- β Verified, minimal changes
- π Human-friendly reports
- βοΈ Ideal for future GUI integration or scripting
β οΈ What Itβs Not
- β Not a full GIF encoder
- β Not for image content editing
- β Not a general-purpose wrapper
gifmeta lives in a small, useful space β metadata tuning and clarity. Nothing more.
π§ Why This Exists
GIFs are still everywhere β especially in messaging, memes, and UI loaders. But modifying timing or loop behavior often requires heavy tools.
gifmeta lets you do it instantly, with:
- π¦ Native Rust speed
- π§Ό Zero bloat
- π₯οΈ CLI-first ergonomics
π¦ Installation
Install via crates.io!:
Or use directly with:
Install via GitHub
Absolutely. Hereβs a clean and helpful section you can add to your README.md under the Installation section:
π§° Installation
Download the binary for your platform from the latest release.
β macOS Users
If you see a warning when trying to run gifmeta, macOS may have quarantined the file because it's unsigned.
To allow execution:
Then run it with:
You only need to do this once per download. After this,
gifmetawill run normally.
Let me know if you want the same clarity for Windows (e.g., SmartScreen warnings) or Linux permissions π
π οΈ Usage
Info options
--json: Get output in json format
Modify (mod) options
You can combine any of the following:
--loop-count <n>: Set loop behavior (0 = infinite, 1 = once, 2 = twiceβ¦)--delay <n>: Set same delay for all frames. Unit is centiseconds (1 = 10ms).--delays <csv>: Override specific frames. Format:1=15,3=50(in centiseconds).
Show metadata
Show metadata output as json
Modify loop count
Modify delay on all frames to 100ms or 10 centiseconds
Modify frame delays using centiseconds (1 = 10ms): frame 0 β 1, frame 1 β 20
Modify delay on all frames to 150ms, set specific frame 0 to 20ms and frame 1 to 200ms.
Modify all values at once example
πΌοΈ Preview a GIF Frame as PNG
You can now extract a specific frame from any GIF and output it as a PNG image β either as a file or directly as base64 for web previews:
πΉ Output frame 0 as PNG to a file
πΉ Output frame 3 as base64 (for GUI, web, etc.)
If
--frameis omitted, it defaults to the first frame (0). You must specify either--as-base64or--output.
π οΈ Commands
| Command | Description |
|---|---|
info |
Display GIF metadata (dimensions, loop, delays) |
mod |
Apply metadata modifications (loop/delays/output) |
preview |
Extract a single frame as PNG (file or base64) |
π Visual Preview Report
You can run:
It will:
- Apply a set of metadata modifications
- Generate side-by-side comparisons
- Output a beautiful
tests/visual/report.html
This is useful for testing transparency, timing, or human-visible playback changes.
π€οΈ Roadmap
- Set loop count (v0.2.0)
- CLI structure with
clap v4 - Set per-frame delays (v0.3.0)
- Frame editing with duration visuals (experimental)
- GUI Companion (Tauri, optional)
β οΈ Batch processing and WASM are intentionally skipped.
These are best handled externally with scripting or shell tooling.
π©βπ» Contributing
Wanna help? Fork, clone, and PRs welcome. You can also suggest Codex tasks or open issues π
π Links
π Built With
- gif
- Rust 2021
- Love, frustration, and sacred formatting
ποΈ License
MIT β do good things with it.
π Author
Built by Mads Paaskesen with Rust and a soft spot for retro formats.