maple allows you to composite images/text with templates into animated GIFs or Videos.
You can download the maple CLI from the releases page.
If you want to build it for some reason, run: cargo install --path . Requires Rust 1.88+. Video and GIF output require ffmpeg and libwebp respectively.
The crate maple-render-core will allow you to render images/text with templates into animated GIFs or Videos programmatically in rust. See http://docs.rs/maple-render-core for documentation.
maple --zip <template.zip> --in <image.png> --gif out.gif
| Flag | Description |
|---|---|
--gif <path> |
Animated GIF |
--webp <path> |
Animated WebP |
--webp-single <path> |
Single-frame WebP |
--vid <path> |
Video (ffmpeg required) |
--save "frame_%06d.jpg" |
Individual frames |
--single |
Single frame only |
WebP output defaults to lossy quality 95 and compression method 4. Use --webp-quality <0..100>, --webp-method <0..6>, or --webp-lossless to override it.
| Flag | Description |
|---|---|
-w/-H |
Output dimensions |
--auto_zoom |
Auto-fit content |
--start <n> |
Starting frame offset |
--first/--last |
Frame range |
| Flag | Description |
|---|---|
--in "text:Hello" |
Text as image layer |
--font_size <n> |
Size (default: 72) |
--text_color "FF0000" |
Hex color |
--text_bg "FFFFFF" |
Background hex |
--in img1.png img2.png # Layers 1, 2
--in img1.png +img1b.png # Both on layer 1maple --json config.json# Photo to toaster GIF
maple --zip templates/toaster.zip --in photo.jpg --gif out.gif
# Full-color animated WebP
maple --zip templates/toaster.zip --in photo.jpg --webp out.webp
# Text billboard
maple --zip templates/billboard-cityscape.zip --in "text:SALE" --gif ad.gif
# Book cover + back
maple --zip templates/book.zip --in front.png back.png --vid book.mp4Template parsing, frame compositing, color quantization and GIF/WebP encoding
are benchmarked with divan in benches/ and
tracked on every push and pull request by
CodSpeed.
# Wall-clock numbers
cargo bench
# Same benchmarks, measured the way CI measures them
cargo install cargo-codspeed --version 5.0.1 --locked
cargo codspeed build --profile codspeed --measurement-mode walltime --locked
cargo codspeed run --measurement-mode walltimeMIT