A free dithering studio: dithered images, shapes, ASCII, effects and animation. GPL-3.0-or-later.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-16 19:40:33 +00:00
.forgejo chore(forgejo): issue and pull request templates 2026-11-14 11:54:46 +01:00
app fix(undo): a step is bounded by the gesture, not by 350 ms 2026-11-16 20:39:28 +01:00
docs openDither 0.1.0 2026-11-13 22:04:17 +01:00
.editorconfig chore: editor config, git attributes and blame-ignore revs 2026-11-14 11:54:46 +01:00
.git-blame-ignore-revs chore: editor config, git attributes and blame-ignore revs 2026-11-14 11:54:46 +01:00
.gitattributes chore: editor config, git attributes and blame-ignore revs 2026-11-14 11:54:46 +01:00
.gitignore Windows as a first-class platform, and the file handling that went with it 2026-11-14 00:16:33 +01:00
AGENTS.md fix(undo): a step is bounded by the gesture, not by 350 ms 2026-11-16 20:39:28 +01:00
CHANGELOG.md fix(undo): a step is bounded by the gesture, not by 350 ms 2026-11-16 20:39:28 +01:00
CONTRIBUTING.md docs: add AGENTS.md and CONTRIBUTING.md 2026-11-14 11:54:46 +01:00
LICENSE openDither 0.1.0 2026-11-13 22:04:17 +01:00
README.md fix(undo): a step is bounded by the gesture, not by 350 ms 2026-11-16 20:39:28 +01:00
SECURITY.md docs: add a changelog and a security policy 2026-11-14 11:54:46 +01:00

openDither

A free dithering studio: turn a picture into dots, lines, characters or shapes, give it a palette, stack effects on it, animate it, and save the result as a picture, a GIF or an editable project.

The interface

Written in Rust with egui. One window, no Electron, no account, no network, no telemetry.

What it does

76 dithering styles in six families — ordered and clustered-dot screens, error diffusion (Floyd-Steinberg, Atkinson, Stucki, Jarvis, …), the orb and matrix patterns, and a plain threshold. Each style has its own controls, its own default palette and its own tonal response, so a two-colour picture keeps its midtones instead of collapsing to black and white.

Palettes from a catalogue of 128 named palettes (3438 colours) at eight colour depths, or extracted from the picture itself, or typed in as hex.

Shape Shifter cuts the picture into cells and draws a shape per cell from a library of 173 shapes, in eight modes, rotated, feathered and banded by tone. ASCII mode does the same with characters, in seven sets or your own, with a font and a colour of your choosing.

Adjustments and effects — brightness, contrast, midtones, highlights, saturation, hue, sharpen, blur, denoise — plus a stack of thirteen post-processing effects: tint, chromatic aberration, glitch, glow, halftone/CMYK, lens curve, subtexture tiles, vignette, grain, temporal variation and more. Effects can be duplicated, disabled, reordered and moved before or after the dither.

Layers with transforms, 16 blend modes, opacity, text layers, clipping and a canvas of any size.

Animation with keyframes on any adjustment or dither property, a timeline, and playback. Export the animation as an animated GIF.

Build it

Rust (stable; the builds and the checks below were run with 1.99):

cd app
cargo build --release
./target/release/opendither

The only system requirements are a working C toolchain (for the WebP encoder) and the usual X11/Wayland or Windows libraries that winit needs. The first build takes a few minutes; after that, a release build is seconds.

Release builds

Prebuilt binaries are attached to the release tag: a Windows .zip and a Linux .tar.gz.

  • Windows: cross-compiled with x86_64-pc-windows-gnu, a mingw-w64 toolchain and -C target-feature=+crt-static, so the .exe needs no DLLs beside it.

    rustup target add x86_64-pc-windows-gnu
    RUSTFLAGS="-C target-feature=+crt-static" \
    CC_x86_64_pc_windows_gnu=x86_64-w64-mingw32-gcc \
    AR_x86_64_pc_windows_gnu=x86_64-w64-mingw32-ar \
    cargo build --release --target x86_64-pc-windows-gnu
    

    The result is app/target/x86_64-pc-windows-gnu/release/opendither.exe. Check that it is a windowed program with objdump -f opendither.exe | grep -i subsystem (it should say Windows GUI), and that no Linux helper survived into it: strings opendither.exe | grep -c zenity must print 0.

    Building on Windows itself with MSVC or the GNU toolchain works the same way (cargo build --release); the CRT flag is only needed when the binary has to travel without libgcc/libwinpthread beside it.

  • Linux: built with zig cc -target x86_64-linux-gnu.2.28, which pins the glibc symbols the binary asks for, so it also runs on distributions older than the build machine (check with objdump -T opendither | grep -o 'GLIBC_[0-9.]*').

The Windows executable is a windowed program: double-clicking it shows the app and no console. Started from a terminal it borrows that terminal's console, so --audit, --help and friends still print where you are looking. PowerShell does not wait for a windowed program, so its prompt comes back before the output does; cmd /c opendither.exe --help waits, if that matters.

Windows will warn the first time it runs ("Windows protected your PC"), because the binary is not code-signed and a certificate is the only thing that changes that. Click More info → Run anyway once; the checksum to compare is in SHA256SUMS beside the download.

What Windows does differently

Nothing the person has to think about, but two things the first Windows build got wrong and this one does not:

  • The file dialogs are the system's own — the common item dialog, through rfd — for pictures, several pictures, projects, presets, shape packs, folders and every save. A Linux build asks zenity and then kdialog instead, because rfd there would either pull GTK into the build or need a running xdg-desktop-portal. src/dialogs.rs holds both and the callers do not know which one they got.
  • The app's own files live in %APPDATA%\opendither (settings, presets, palettes, saved shape sets, the recent list, the crash log), not in whatever folder the program was started from. On Linux it is ~/.local/share/opendither and on macOS ~/Library/Application Support/opendither; src/paths.rs decides. opendither --diagnose prints which one this run uses.

Text layers and ASCII mode look for fonts in %WINDIR%\Fonts and in the per-user font folder, so the family picker lists the fonts the machine actually has.

Use it

opendither                        # start with the sample picture
opendither picture.png            # open a picture
opendither project.opendither     # open a project

Everything is in the one window: the icon rail on the left switches panels, the right-hand column holds the controls of the open panel, and the picture sits in the middle at the zoom you choose. Drag a picture or a project onto the window to open it.

Keyboard

Key What it does
Ctrl+Z / Ctrl+Y, Ctrl+Shift+Z undo / redo
Ctrl+S / Ctrl+Shift+S save the project / save as
Ctrl+O / Ctrl+E open a project / export the picture
Ctrl+V / Ctrl+Shift+C paste a picture from the clipboard / copy the result
Ctrl+[ / Ctrl+] rotate the picture left / right
Ctrl+Shift+H / Ctrl+Shift+J flip horizontally / vertically
arrows, Shift+arrows nudge the selected layer by 1 px / 10 px
Space play / pause the animation
F11 full screen

A text field keeps its own keys while it has the focus: Ctrl+Z there undoes the typing, not the document.

Files

A project is a .opendither file: a ZIP with project.json (the document: layers, dither settings, palette, effects, animation, shapes) and a media/ folder with the pictures and tiles it uses. Saving never loses a block it does not understand, so a project can travel between versions.

A preset is a .opendither.preset file: plain JSON with one look — palette, dither settings, effects, shapes — with no pictures in it.

Exports: PNG, JPEG, WebP, GIF, plus SVG while Shape Shifter is the output stage and TXT while ASCII mode is on. Width, height, quality and colour profile are in the Export panel.

On the command line

opendither --render out.png --effect orbs    # the canvas at its own size, no window
opendither --screenshot ui.png --tab layers  # the interface, no window
opendither project.opendither --gif-out anim.gif   # the animation as a GIF
opendither --audit                           # 558 functional checks
opendither --controls                        # 62 switches flipped, each proved by its effect
opendither --uitest                          # 111 interaction tests
opendither --selftest                        # 456 renders: every style on every palette
opendither --help                            # every flag

The checks are part of the program rather than a separate test rig: --audit executes each module and fails loudly, --controls flips each lever and compares the pixels, --uitest drives real pointer events through the real panels. If a feature is described here, one of them exercises it.

Settings and data

Settings, saved palettes, presets, imported tiles and the crash log live in the app's own folder: ~/.local/share/opendither/ (or $XDG_DATA_HOME/opendither) on Linux, %APPDATA%\opendither on Windows, and ~/Library/Application Support/opendither on macOS. Never in the folder the program happens to be started from; opendither --diagnose prints the one in use. Nothing leaves the machine.

On a Wayland desktop the app runs through X11 (XWayland) by default, because winit's Wayland backend cannot receive a file dropped on the window. OPENDITHER_WAYLAND=1 keeps native Wayland and gives up on dragging files in.

Licence

GNU General Public License, version 3 or later — see LICENSE. That means you may use, study, share and change this program freely, and that anything you distribute based on it stays free in the same way.

This program comes with no warranty, to the extent permitted by law.

The libraries it links keep their own licences, all of them compatible with the GPL: eframe/egui, image, ab_glyph, arboard, flate2, gif, serde, webp (MIT or Apache-2.0), and Rust's standard library (MIT or Apache-2.0).

Contributing

Bug reports and patches are welcome in this repository's tracker and pull requests. CONTRIBUTING.md has the build, the checks a patch has to pass, and the commit and pull request rules; AGENTS.md is the longer version, for people and for the agents they run. Two rules from it keep the codebase honest:

  1. A feature is not done until a check exercises it. Add the --audit, --controls or --uitest row in the same change, and make it fail if the feature breaks.
  2. Numbers in the code are measurements, not guesses. If a formula has constants in it, say where the numbers come from in a comment next to them.