Repository navigation
Export: animated GIF of the deck (Export… dialog, CLI, MCP) (#171) - #177
Merged
Merged
Conversation
…d#171) There was no way to turn a presentation into an animated GIF. file.export now writes one: format `gif` (or a .gif path), one frame per slide drawn by the slide renderer and shown for secondsPerSlide, encoded with the `image` crate's GIF encoder (already a dependency, no new crates) with a 256-colour palette per frame: exact when a slide has 256 colours or fewer, NeuQuant otherwise. Slides are composited onto white. Options: width (small 640, medium 960 (default), large 1280, extraLarge 1920, or 16-3840 px; the height follows the slide's aspect ratio, no side over 3840), secondsPerSlide (0.1-600, default 5, written in GIF hundredths), loop (forever by default, or once: no NETSCAPE2.0 block), slides (a list of indices, in play order) and includeHidden (hidden slides are skipped by default). Out-of-range or wrongly typed values, NaN and infinities are BadParams errors, never panics; at most 500 frames and 200 million pixels in total, checked before anything is rendered. - Engine: crates/engine/src/gif_export.rs (options, frame list, size, encoder); cmd::file::gif_bytes, save_bytes("gif"), format_for_path(".gif"). - UI: the Export… dialog (Command palette; the app has no File menu yet) gets "Animated GIF (.gif)" with Size, Seconds per slide, From/To slide, Loop forever and Include hidden slides; an invalid range or value keeps the dialog open with a message. The web build downloads the bytes (image/gif). - CLI: convert IN OUT.gif, run --export OUT.gif --export-params JSON; usage lists the format and options. - MCP: the export tool lists gif and width/secondsPerSlide/loop (slides and includeHidden now apply to PDF and GIF). - Docs: file-format parity GIF row, gaps (video export remains), parity checklist row M -> P (P2 breadth 36% -> 37%, overall 79%), control protocol, MCP, README, ROADMAP progress log. Transitions and build animations are not animated in the GIF (tracked with video export). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 12, 2026
Member
|
Thank you for this contribution, @Mathiasko! It has landed on If you haven't already, please come join us on Discord: https://discord.gg/artcraft |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #171.
Problem
There was no way to turn a presentation into an animated GIF:
docs/file-format-parity.mdlisted "Animated GIF of the deck" as export: no,docs/gaps.mdhad it under "No video or animated GIF export", and the checklist row was M. PowerPoint's Export ▸ Create an Animated GIF is a common way to share a short deck.What changed
file.exportwrites an animated GIF (formatgif, or a.gifpath): one frame per slide from the slide renderer, shown forsecondsPerSlide, through theimagecrate's GIF encoder (already a dependency; no new crates). Each frame gets its own 256-colour palette: exact when the slide has 256 colours or fewer, NeuQuant otherwise. Slides are composited onto white.width(small 640, medium 960 (default), large 1280, extraLarge 1920, or 16–3840 px; the height follows the slide's aspect ratio, no side above 3840),secondsPerSlide(0.1–600, default 5),loop(forever by default, or once),slides(indices in play order) andincludeHidden(hidden slides are skipped by default).deckcraft-cli convert IN OUT.gif,deckcraft-cli run --export OUT.gif --export-params '{"width":"large","secondsPerSlide":3}'; usage lists the formats and GIF options.exporttool listsgifand its options (width,secondsPerSlide,loop;slidesandincludeHiddennow apply to PDF and GIF), as in Issue #44: MCP: the export tool lists PDF and its layout options #65.Tests
width: 0is a tool error.run --export --export-paramsandconvertwrite GIFs; bad options are errors.Verified on macOS arm64
CRAFT_FONTS_DIR=<craft-fonts at ci.yml's CRAFT_FONTS_REF> cargo xtask cipasses (fmt, clippy-D warnings, 509 tests, assets, layers, wasm). The last edit after that run only reworded comments and docs;cargo fmt --checkpasses on it.Notes
docs/ui-parity.md), so the Export… dialog is reached from the Command palette (⌘F). The palette lists two entries labelled "Export…": the UI one that opens the dialog, and the enginefile.export, which needs apathand fails with "missingpath" when run from the palette. That duplicate already exists onmain; not changed here.Not in this PR
gaps.md).🤖 Generated with Claude Code