ASCII GIF viewer
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.
composer require candycore/candy-flip
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();
solid โ full-cell โ in 24-bit truecolor. density โ luminance ramp ` .:-=+*#%@`.Space pauses; โ / โ step through frames manually.d swaps solid โ density without losing your position.Cmd::tick($interval, โฆ) schedules frame advance โ no busy-waiting in the main fiber.VHS-recorded GIFs of every example shipped with the app. Regenerated automatically on every push that touches the source.