Ditter

A real-time dithering tool with 60+ algorithms, GPU acceleration, video support, and a pattern playground.

Ditter landing page
The Ditter interface: canvas area with toolbar, resizable control panel on the right.

Ditter is a browser-based (and desktop via Tauri) image and video dithering tool. It transforms images and video frames using a wide variety of dithering, halftone, pattern, and creative algorithms, all processed in real-time. Many algorithms are GPU-accelerated via WebGL2 for instant feedback even on large images. Videos can be processed frame-by-frame and rendered to WebM.

How It Works

The processing pipeline runs in this order for every parameter change:

1. Adjustments (contrast, midtones, highlights, invert) → 2. Blur / Smoothing / Depth3. Scale (downscale for pixelation) → 4. Dither Algorithm5. Upscale (back to original size) → 6. Blend (mix with original) → 7. Effects Layer (post-processing)

Steps 1-6 run in a Web Worker off the main thread. If WebGL2 is available, per-pixel-independent algorithms run on the GPU. Sequential algorithms (error diffusion, creative) run on the CPU with optimized routines. Step 7 (Effects Layer) runs on the main thread after the dithered result is returned, and is skipped entirely when no effects are active. When only effects change, the dither step is not re-run, making adjustments instant.

Getting Started

Loading an Image

Drag and drop an image onto the canvas, click the drop zone to browse, or use Ctrl+O to open the file picker. Supported formats: PNG, JPG, WebP, GIF.

Loading a Video

Drag and drop a video file (MP4, WebM, or QuickTime) onto the canvas, or use the file picker. Ditter will extract frames and display a filmstrip below the canvas. Each frame is dithered using the same processing pipeline as images. See the Video section for full details.

Generating a Gradient

Click "Or generate a gradient" in the drop zone (or "Generate Gradient" in the Source section) to create a synthetic gradient. Choose between solid color, linear gradient, or radial gradient. Adjust colors, dimensions, and angle.

Gradient loaded with Floyd-Steinberg dithering
A generated gradient processed with Floyd-Steinberg error diffusion.

Choosing an Algorithm

Use the Category dropdown to pick an algorithm family, then the Algorithm dropdown to select a specific method. Results update in real-time as you change settings.

Toolbar

The header toolbar provides image transform controls:

Flip H / Flip V / Rotate (90 CW) / Reset (undo all transforms)

Error Diffusion

Error diffusion algorithms quantize each pixel to the nearest palette color, then distribute the quantization error to neighboring pixels. This creates organic, film-grain-like dithering with no visible pattern. All error diffusion algorithms are inherently sequential (left-to-right, top-to-bottom) and run on the CPU.

Floyd-Steinberg
The classic. Distributes error to 4 neighbors using a 2x3 matrix. The most widely used error diffusion algorithm.
CPU Fast
Jarvis-Judice-Ninke
Wider 3x5 diffusion kernel. Smoother gradients than Floyd-Steinberg but slightly slower.
CPU Fast
Stucki
Similar to Jarvis with different weights. Good balance of speed and quality.
CPU Fast
Burkes
Simplified Stucki with 2-row diffusion. Faster with nearly identical quality.
CPU Fast
Sierra (Full / Two-Row / Lite)
Three variants: full 3-row, 2-row, and lite. The lite variant is one of the fastest error diffusion methods.
CPU Fast
Atkinson
Used in early Macintosh. Diffuses only 6/8 of the error, creating higher-contrast results with more white space.
CPU Fast
Stevenson-Arce
Hexagonal grid error diffusion. Works on a shifted grid for more uniform distribution.
CPU Fast
Riemersma
Hilbert-curve path error diffusion. Walks a space-filling curve, producing very uniform results with no directional bias.
CPU Fast
Minimized Average Error
Wide 5x3 kernel optimized to minimize average error across the neighborhood.
CPU Fast

Ordered Dithering

Ordered dithering compares each pixel against a repeating threshold matrix (Bayer matrix). The result is a regular, tile-like pattern. All Bayer variants are GPU-accelerated.

Bayer 4x4 with Game Boy palette
Bayer 4x4 ordered dithering with the Game Boy palette, a classic retro look.
Bayer 2x2 / 4x4 / 8x8 / 16x16
Classic Bayer matrix dithering at different resolutions. Larger matrices produce smoother gradients with less visible grid pattern.
GPU Instant
Clustered Dot 4x4 / 8x8
Ordered dithering using clustered-dot threshold maps. Creates dot-like patterns similar to printed halftones.
CPU Fast
Void and Cluster
Blue-noise ordered dithering from a void-and-cluster threshold map. Very uniform with no visible pattern structure.
CPU Fast

Halftone

Halftone algorithms simulate traditional printing. They divide the image into cells and render each cell as a shape (dot, line, diamond, etc.) whose size is proportional to the local darkness. All halftone algorithms are GPU-accelerated.

Dot halftone
Dot Halftone, the classic newspaper printing effect.
Dot Halftone
Classic circular dots. Brighter areas get smaller dots, darker areas get larger ones.
GPU Instant
Line Halftone
Horizontal lines of varying thickness. Thicker = darker.
GPU Instant
Diamond / Cross / Square / Star
Shape variations on the halftone theme: Manhattan distance (diamond), min-axis (cross), Chebyshev distance (square), and angular modulation (star).
GPU Instant
Ellipse Halftone
Elliptical dot shapes for a more print-like appearance.
CPU Fast

Noise / Stochastic

Noise-based dithering uses random or pseudo-random threshold values per pixel. These create organic, grain-like textures with no regular pattern.

Blue noise with Cyberpunk palette
Blue Noise dithering with the Cyberpunk color palette.
Random Noise
Simple per-pixel random threshold. Fast but produces visible grain.
GPU Instant
Blue Noise
Void-and-cluster blue noise dithering. Visually the most pleasing noise, with high-frequency distribution that avoids clumping.
CPU Fast
White Noise
Deterministic seeded white noise. Same seed = same result, useful for consistent output.
GPU Instant
Interleaved Gradient Noise
Jorge Jimenez's IGN algorithm. Low-discrepancy noise that produces very clean dithering, commonly used in real-time rendering.
GPU Instant
Perlin Noise
Classic 2D Perlin noise as threshold. Creates organic, cloud-like patterns in the dithering.
GPU Instant

Pattern

Pattern algorithms apply geometric, repeating structures as dithering thresholds. The pattern modulates the threshold spatially, creating decorative and structural effects.

Crosshatch pattern
Crosshatch pattern dithering, mimicking hand-drawn cross-hatching technique.
AlgorithmDescriptionAccel
Checkerboard2x2 alternating pixel patternGPU
Horizontal LinesVarying density horizontal stripesGPU
Vertical LinesVarying density vertical stripesGPU
CrosshatchCombined H/V + diagonal linesGPU
Diagonal Lines45-degree diagonal stripesGPU
SpiralSpiral pattern radiating from centerGPU
HexagonalHex grid tiling with distance-from-center thresholdGPU
BrickOffset rectangular brick wall patternGPU
Wave SineUndulating sine wave thresholdGPU

Artistic

Artistic algorithms go beyond traditional dithering to produce stylized, illustrative effects. These simulate techniques from printmaking, painting, and digital art.

Sketch algorithm
Sketch algorithm with Grayscale 8 palette, simulating pencil strokes.
Pixel Art
Downscales and palette-quantizes for a retro pixel art look. Best combined with Scale > 1.
CPU Fast
Sketch
Simulates pencil strokes using Sobel edge direction modulated by Perlin noise. Creates directional hatching.
CPU Fast
Lichtenstein (Pop Art)
Bold pop-art style with large halftone dots, heavy outlines, and high contrast. Inspired by Roy Lichtenstein.
CPU Fast
Engraving
Simulates line engraving with varying line weight based on luminance.
CPU Fast
Pointillism
Impressionist-style colored dots scattered with varying size and density.
CPU Fast
Mosaic / Voronoi
Voronoi cell partitioning. Mosaic averages colors within cells; Voronoi uses palette quantization per cell.
CPU Moderate
Stippling
Places dots weighted by darkness. Uses Voronoi-based weighted distribution for natural placement.
CPU Moderate

Threshold

Threshold algorithms quantize pixels based on brightness cutoffs. Simple and fast, they produce bold, high-contrast results.

Simple Threshold
Binary threshold: above = light, below = dark. Threshold slider controls the cutoff.
GPU Instant
Multi-Level
Posterizes to multiple brightness levels. Creates a staircase of tones.
GPU Instant
Adaptive
Local adaptive threshold using an integral image. Threshold varies with local neighborhood brightness, good for uneven lighting.
CPU Fast
Otsu
Automatically finds the optimal threshold by maximizing inter-class variance in the histogram. No manual threshold needed.
CPU Fast

Creative / Experimental

These algorithms push beyond traditional dithering into generative art, glitch aesthetics, and simulation-based rendering. Some are computationally intensive but produce unique results.

Pixel sort
Pixel Sort, a glitch art technique that sorts pixel runs by luminance.
Pixel Sort
Glitch art technique. Sorts pixel rows by luminance within brightness bands. The Threshold slider controls which pixels get sorted.
CPU Fast
Reaction-Diffusion
Gray-Scott simulation producing organic Turing patterns. GPU-accelerated with ping-pong framebuffers when WebGL2 is available.
GPU Moderate
DLA Clustering
Diffusion-Limited Aggregation. Random-walk particles stick on contact, forming organic branching structures like coral or lightning.
CPU Slow
Voronoi Stippling
Weighted Voronoi stippling with Lloyd relaxation. Dots converge toward image darkness through iterative optimization.
CPU Moderate
Flow Field
Traces streamlines following the image gradient direction. Creates organic, flowing line art where strokes follow edges.
CPU Moderate
ASCII Art
Maps image brightness to character density patterns in a cell grid. Dense characters = dark areas.
CPU Fast
Edge-Aware Dither
Preserves edges with hard quantization while using Floyd-Steinberg error diffusion in flat areas. Combines the best of both approaches.
CPU Fast
Posterize Dither
Posterization with Bayer-dithered transitions between color bands. Smooth band blending instead of hard edges.
CPU Fast

Effects Layer

The Effects Layer is a post-processing pipeline that runs after dithering. It provides 16 effects across 4 categories that can be combined to create glitch, color, texture, and distortion effects on your dithered output. Open it by clicking Effects Layer in the control panel, which slides open a secondary sidebar.

Effects are applied on the main thread to the cached dithered result. This means changing effect parameters is instant, no re-dithering required. The processing order is: Color → Chromatic Aberration → Distort → Glitch → Texture.

Controls

The Effects panel has a master toggle (enable/disable all effects at once) and a Reset button that returns all parameters to their defaults. Each category section is collapsible.

Glitch (5 effects)

Scanline Shift
Randomly offsets rows horizontally, creating horizontal glitch streaks. Controls: Amount (0-100 px), Density (0-100%).
Block Shift
Shifts rectangular blocks horizontally, classic corrupted-data look. Controls: Amount (0-50 px), Block Height (4-64 px).
RGB Split
Displaces R/G/B channels in opposite directions for chromatic aberration. Controls: Amount (0-20 px), Angle (0-360).
Interlace
Darkens alternating rows for a CRT/VHS feel. Controls: Opacity (0-100%), Gap (1-4 lines).
Data Corruption
Replaces random pixels with nearby values, simulating digital artifacts. Controls: Amount (0-100).

Color (6 controls + Chromatic Aberration)

ControlRangeDefaultDescription
Hue Rotate0 - 3600Rotates all colors around the color wheel.
Saturation0 - 200100Color intensity. 0 = grayscale, 100 = normal, 200 = oversaturated.
Temperature-100 to +1000Warm/cool color shift. Positive = warmer, negative = cooler.
Red / Green / Blue0 - 200100 eachIndependent per-channel intensity (channel mixer).

Chromatic Aberration

A radial per-channel displacement effect. Each color channel (R, G, B) is displaced outward from the image center by a configurable amount, producing a lens-like color fringing effect. The displacement is proportional to the distance from center.

ControlRangeDefaultDescription
Max Displace1 - 10020Maximum pixel displacement at the image edges.
Red0 - 10010Red channel displacement fraction (% of max).
Green0 - 10090Green channel displacement fraction.
Blue0 - 10050Blue channel displacement fraction.

Texture (3 effects)

Film Grain
Luminance noise overlay with configurable coarseness. Controls: Amount (0-100), Size (1-3 px).
Vignette
Radial edge darkening, like a camera lens effect. Controls: Amount (0-100), Size (10-90).
Scanlines
CRT-style horizontal line overlay. Controls: Opacity (0-100%), Spacing (1-8 px).

Distort (3 effects)

Wave
Sine wave displacement for a liquid/underwater effect. Controls: Amp X/Y (0-30 px), Freq X/Y (1-20).
Pixel Scatter
Random pixel displacement within a radius, creating a shatter effect. Controls: Radius (0-20 px).
Barrel Distort
Barrel/pincushion lens distortion. Positive = barrel, negative = pincushion. Controls: Amount (-100 to +100).

Dither Bypass

The Style section includes a toggle switch next to the section title that enables or disables all dithering. When disabled, the image passes through without any dither algorithm applied, letting you use effects on the original image directly.

Color Palettes

Ditter ships with 34+ built-in palettes across 4 categories. You can also create custom palettes.

Default

PaletteColorsUse Case
Black & White2Classic 1-bit dithering
Black, Gray, White3Simple tonal range
Grayscale 4 / 8 / 164, 8, 16Monochrome with more tonal steps

Retro

PaletteColorsEra
Game Boy / Game Boy Pocket4Nintendo 1989
CGA Palette 0 / 14IBM PC 1981
EGA16IBM PC 1984
Commodore 6416Commodore 1982
ZX Spectrum15Sinclair 1982
NES54Nintendo 1983
SNES16Nintendo 1990
Sega Genesis64Sega 1988

Modern

Contemporary palettes: Pastel, Neon, Earth Tones, Ocean, Sunset, Forest (8 colors each).

Themed

Stylistic palettes: Bubblegum, Vaporwave, Cyberpunk, Retrowave, Monochrome Blue/Red/Green, Sepia (8 colors each).

Presets

Presets save and restore all control panel settings at once. Ditter includes 21 built-in presets covering a range of classic and creative styles.

Retro Game Boy
Bayer 4x4 + Game Boy palette
Newspaper
Dot halftone + B&W
Classic Dither
Floyd-Steinberg + B&W
Vapor Wave
Bayer 8x8 + Vaporwave
Cyberpunk Neon
Blue noise + Cyberpunk
Mac Classic
Atkinson + B&W
Pixel Art
Pixel art + NES palette
High Contrast
Simple threshold + B&W
Vintage Photo
Atkinson + Sepia
Comic Book
Dot halftone + Grayscale 4
CRT Scanline
H-lines + EGA palette
Thermal Camera
Multi-level + Sunset
Blueprint
Crosshatch + Blue (inverted)
Woodcut
Line halftone + B&W
Matrix Rain
IGN + Green monochrome
Pencil Sketch
Sketch + Grayscale 8
Glitch Sort
Pixel sort + Grayscale 16
Turing Pattern
Reaction-diffusion + B&W
Dot Stipple
Stipple + B&W
Flow Art
Flow field + B&W
ASCII Art
ASCII + B&W

You can also Save Preset to create your own, and Reset All to return to defaults.

Controls Reference

All adjustable parameters in the control panel:

ControlRangeDefaultDescription
Scale1 - 81Downscale factor. Higher values create larger, blockier pixels (pixelation effect).
Line Scale0.1 - 3.01Scales pattern/halftone cell sizes and line spacing. Higher = coarser patterns.
Smoothing0 - 1000Pre-dither blur. Reduces noise in the source, producing cleaner dithering.
Blend0 - 100100Mix between original and dithered result. 0 = original, 100 = fully dithered.
Contrast0 - 10050Pre-dither contrast adjustment. Uses a tangent curve for smooth control.
Midtones0 - 10050Gamma adjustment for midtone brightness. Below 50 = darker, above 50 = lighter.
Highlights0 - 10050Boosts or dims bright areas specifically.
Threshold0 - 10050Algorithm-specific threshold. Controls cutoff for threshold algorithms, band width for pixel sort, etc.
Blur0 - 100Pre-dither box blur (3-pass separable, O(n) regardless of radius).
Depth0 - 100Edge enhancement via unsharp mask. Sharpens detail before dithering.
Inverton/offoffInverts colors before dithering.

Dither Studio

The Studio is an advanced editor for creating custom dithering patterns. Open it via the Studio button in the header.

Dither Studio
The Dither Studio with Classic tab showing the error diffusion matrix editor and threshold map.

Classic Tab

Edit custom error diffusion matrices and threshold maps directly. Set matrix size, adjust individual weights, and see the divisor update automatically. Changes preview in real-time on the right.

Paint Tab

Draw threshold patterns freehand on a pixel grid (8x8, 16x16, or 32x32). Select a brush value (0-255) and paint directly. Tools: Clear, Invert, Random, Bayer Fill.

Shape Lab

Generate threshold patterns from mathematical shapes: circle, diamond, square, cross, star, ring, hexagon. Adjust cell size, rotation angle, and elongation. A live preview shows the distance field.

Wave Mixer

Combine up to 8 wave layers to create complex threshold patterns. Each layer has: wave type (sine/triangle/sawtooth/square), direction, frequency, amplitude, phase, and blend mode (add/multiply/min/max).

Keyboard Shortcuts

Open fileCtrl + O
ExportCtrl + E
Zoom in+ or =
Zoom out-
Reset zoom (1:1)0
Zoom to fitF
Close modalEsc

Video Mode

These shortcuts are active when a video is loaded:

Previous frame
Next frame
Play / PauseSpace
First frameHome
Last frameEnd

Pan the canvas by clicking and dragging. Zoom with the scroll wheel (zooms toward cursor).

Performance

Ditter uses several strategies to keep processing fast:

GPU Acceleration

~28 algorithms run on the GPU via WebGL2 fragment shaders. This includes all ordered, halftone, noise, pattern, and basic threshold algorithms. Processing is essentially instant regardless of image size.

Web Worker

All processing runs in a dedicated Web Worker, keeping the UI responsive. Results are transferred back via zero-copy buffer transfer.

Optimized Algorithms

CPU algorithms use: k-d tree palette lookups (O(log n) vs O(n) linear search), pre-computed LUTs for adjustments, separable box blur (O(n) regardless of radius), and spatial grid indexing for Voronoi-based algorithms.

Reaction-Diffusion GPU Pipeline

The reaction-diffusion algorithm uses a special multi-pass GPU pipeline with ping-pong framebuffers. The Gray-Scott simulation runs entirely on the GPU using RGBA16F float textures, making it 50-100x faster than CPU.

Speed Reference

CategorySpeedNotes
GPU algorithmsInstant< 5ms on any image size
Error diffusionFast~20-50ms for 1080p
Artistic (most)Fast~30-80ms
Stippling / FlowModerate~200-500ms
DLA ClusteringSlow~1-3s depending on image size

Note: Running via file:// protocol disables Web Workers and WebGL in workers. Use a local HTTP server (python3 -m http.server 8000) or the Tauri desktop app for full performance.

Export

Click Export (or Ctrl+E) to open the export dialog.

Export dialog
The export dialog with format, quality, and scale options.

Options

SettingDescription
FormatPNG (lossless, default), JPEG, WebP, or SVG (Vector)
Quality1-100, for JPEG/WebP only (hidden for PNG and SVG)
Scale1x, 2x, 4x output resolution multiplier (hidden for SVG)
FilenameCustom filename (defaults to "ditter-export")

SVG Export

SVG export converts the dithered result into a scalable vector file. The exporter scans the image to detect the effective cell size (the pixel block size used by the dither algorithm), then represents each cell as an SVG <rect>. Cells are grouped by color for efficiency, and consecutive cells on the same row are merged into wider rectangles to reduce file size. The most common color is used as a background fill.

When SVG is selected, the dialog shows an info line with the detected cell size and total cell count. For large images (over 100,000 cells), a warning is displayed since the resulting SVG file may be very large. SVG is most effective with low-resolution dithered images or high Scale values where each visible "pixel" covers multiple actual pixels.

On the Tauri desktop app, export opens a native Save As dialog so you can choose the destination folder. In the browser, files are downloaded directly.

For video export, see the Video section below.

Themes

Toggle between dark and light mode with the theme button (Lt/Dk) in the top-right corner. Your preference is saved to localStorage.

Light theme
Ditter in light mode.

Video

Ditter can load video files and apply dithering frame-by-frame using the same processing pipeline as images. The result can be rendered to a downloadable WebM file.

Loading a Video

Drag and drop an MP4, WebM, or QuickTime file onto the canvas (or use the file picker). Ditter extracts the video metadata, calculates the total frame count, and builds a filmstrip of thumbnails below the canvas. Frame 0 is displayed and dithered automatically.

Filmstrip

The filmstrip appears below the canvas when a video is loaded. It includes:

ControlDescription
Prev / NextStep one frame backward or forward
Play / PausePreview playback at ~8fps (dithered in real-time)
Frame counterShows current frame number and total
ScrubberDrag to seek to any frame
Time displayCurrent time position in the video
Thumbnail trackClick any thumbnail to jump to that frame. For long videos (300+ frames), thumbnails are sampled at 1 per second.

Processing

Every dithering control (algorithm, palette, scale, contrast, etc.) works exactly as with images. When you change a setting, the current frame is re-processed and the processed frame cache is cleared so that subsequent frames use the new settings.

Ditter maintains an LRU cache of up to 50 processed frames. Previously visited frames with unchanged settings display instantly from the cache.

Rendering

Click the Render button in the header (visible only in video mode) to open the render dialog. Options:

SettingDescription
FPSOutput frame rate: 12, 15, 24 (default), or 30
QualityBitrate in Mbps (1, 20, default 8)
FilenameOutput filename (defaults to "ditter-video")

Rendering processes every frame sequentially through a dedicated Web Worker, draws each result to a canvas, and captures the stream using MediaRecorder. The output format is WebM (VP9 preferred, VP8 fallback). A progress bar shows completion percentage, and rendering can be cancelled at any time.

On the Tauri desktop app, a native Save As dialog lets you choose where to save the WebM file. In the browser, the file downloads automatically.

Memory

Raw video frames are never stored in memory. They are extracted on-demand from the video element via seeking. The processed frame cache holds up to 50 frames (roughly 400MB at 1080p in the worst case). Thumbnails are lightweight (~40KB each). During rendering, frames flow sequentially through the worker and are not cached.

Packaging and Deployment

Ditter is built with Tauri v2, which compiles your web frontend into a native desktop app with a small Rust backend. Here is what you need to know to package and distribute the app.

Prerequisites

RequirementDetails
RustInstall via rustup. The Tauri CLI uses Cargo internally.
Node.jsFor any frontend build tooling (Ditter uses a simple HTTP server for dev).
Tauri CLIcargo install tauri-cli --version "^2"
Platform toolsmacOS: Xcode Command Line Tools. Windows: Visual Studio Build Tools + WebView2. Linux: see Tauri prerequisites.

Development

Run cargo tauri dev from the project root. This starts the dev HTTP server and compiles the Rust backend in debug mode with hot-reload on file changes.

Building for Release

Run cargo tauri build to create a production build. This produces platform-specific installers:

PlatformOutputLocation
macOS.dmg and .app bundlesrc-tauri/target/release/bundle/dmg/
Windows.msi and .exe (NSIS)src-tauri/target/release/bundle/nsis/
Linux.deb, .AppImage, .rpmsrc-tauri/target/release/bundle/

Code Signing

To distribute outside of development, you should sign the app:

macOS: Requires an Apple Developer account ($99/year). Set the APPLE_SIGNING_IDENTITY environment variable or configure signing in tauri.conf.json under bundle > macOS. For notarization, also set APPLE_ID, APPLE_PASSWORD (app-specific), and APPLE_TEAM_ID.

Windows: Use a code signing certificate (EV or OV). Set TAURI_SIGNING_PRIVATE_KEY and related env vars. Tauri supports SignTool and Azure Trusted Signing.

Linux: No signing required for AppImage/deb distribution, though GPG signing is recommended for package repositories.

Cross-Platform Builds

Tauri builds natively, so you need each target OS to produce its installer. For CI/CD, use GitHub Actions with a matrix strategy across macOS, Windows, and Ubuntu runners. The tauri-action GitHub Action automates this and can create GitHub Releases with all installers attached.

Updater

Tauri v2 includes a built-in updater plugin (tauri-plugin-updater) that checks a remote JSON endpoint for new versions and downloads updates automatically. Configure the update URL in tauri.conf.json and host the update manifest alongside your release assets.

Ditter, a real-time dithering tool.