โ† All apps

CandyFlip

๐ŸŽž CandyFlip

ASCII GIF viewer

port of gifterm gif ascii-art ext-gd truecolor

Decodes a .gif on disk via ext-gd, downsamples each frame to a configurable cell grid, and renders the animation as ANSI-coloured Unicode block-glyphs. Two presets: solid 24-bit blocks or a luminance-ramp ASCII rendering.

Install

composer require candycore/candy-flip

Quickstart

candy-flip my-animation.gif         # solid blocks (default)
candy-flip my-animation.gif density # luminance ramp

// Programmatic:
use CandyCore\Core\Program;
use CandyCore\Core\ProgramOptions;
use CandyCore\Flip\Decoder;
use CandyCore\Flip\Player;

$frames = Decoder::decode('cat.gif', cellsW: 80, cellsH: 30);
(new Program(new Player($frames),
             new ProgramOptions(useAltScreen: true)))->run();

What's in the box

ext-gd decodeWalks the GIF byte stream for image-descriptor offsets, hands each frame to GD, downsamples to cell space.
Two presetssolid โ€” full-cell โ–ˆ in 24-bit truecolor. density โ€” luminance ramp ` .:-=+*#%@`.
Pause + stepSpace pauses; โ† / โ†’ step through frames manually.
Preset toggled swaps solid โ†” density without losing your position.
Frame capDecoder caps at 256 frames so a runaway file can't OOM the runtime.
Cmd::tick drivenCmd::tick($interval, โ€ฆ) schedules frame advance โ€” no busy-waiting in the main fiber.

Source & demos

Try the quickstart โ†’

Demos.

VHS-recorded GIFs of every example shipped with the app. Regenerated automatically on every push that touches the source.

Play

Play

Synthetic gif decoded + rendered through both presets.