[ ← back to projects ]

ditherBot

2025-Present

ditherBot began as a Discord bot that turns uploaded GIFs into black-and-white dithered art with the Floyd-Steinberg algorithm. Instead of a flat black/white threshold, which throws most of the detail away, error diffusion pushes each pixel's rounding error onto its neighbours, so gradients and shading survive as patterns of dots.

It has since grown into dither, a dithering studio that runs entirely in the browser. Nothing is uploaded: a Content-Security-Policy blocks every network request, so your images never leave the tab.

What it does
• Images, GIFs, video clips, a live camera and screen capture, plus a text banner maker
• Six algorithms (Floyd-Steinberg, Atkinson, Stucki, Bayer, halftone, threshold), colour palettes pulled from the image, and sketch-style ink lines
• Turns stills into seamless animated loops (sweep, breathe, boil, scan, glitch)
• Hides AES-256 encrypted messages inside the dither pattern. The passphrase decides which pixels carry the bits, so without it there is nothing to find.
• Exports PNG, animated GIF, SVG, and braille or ASCII text art. Installs as an offline app.

How it is built
No framework and no runtime dependencies. The GIF encoder and decoder are written from scratch, the dithering engine runs in a Web Worker so the page never freezes, and a Vite build ships a single minified file to Vercel.

The original Discord bot (discord.js, sharp, canvas, gif-frames/gifwrap) also includes an experimental AI slash-command generator via the Groq API.

Below: the web app, and an example of the bot's output.

JavaScriptCanvasWeb WorkersWebCryptoVitediscord.js