Documentation
¶
Overview ¶
Animated-GIF capture for the README. Drives the same demo-repo server as the screenshot set, but records a *sequence* of frames through a scripted flow and encodes them as a looping GIF.
Encoding is pure-Go (image/gif) — there is no ffmpeg/gifsicle dependency, matching prereview's "single binary, no external tools" ethos. Frames are captured at the desktop viewport, downscaled to the README display width (golang.org/x/image/draw, high-quality CatmullRom), then quantized to a 256-colour paletted image for GIF. The quantizer is pluggable (see quantizeFrame) so we can start with the stdlib fixed palette and swap to an adaptive one only if the syntax-highlighted UI bands badly.
Usage (see cmd/screenshot/capture-gifs.sh):
go run ./cmd/screenshot --gif hero --url http://127.0.0.1:8765 --out docs
Screenshot dev helper. Connects to a running prereview server and captures PNGs at iPhone and laptop viewports so visual bugs can be checked without asking the user to refresh and screenshot.
Usage:
go run ./cmd/screenshot --url http://127.0.0.1:8765 --out /tmp/prereview