Skip to content

Releases

v0.5.0

Choose a tag to compare

@capy-ai capy-ai released this 24 Nov 12:41

What's new

  • WebP is now smaller than PNG: a new palette-aware lossless WebP encoder replaces the old one, which stored every pixel as full colour. A 1200×800 photo with the editorial-print preset went from 391 KB to 81 KB (PNG: 83 KB), and a 3000×2000 auto-palette-64 image from 7.9 MB to 1.3 MB. Across 25 test images, WebP is now 2–20% smaller than dith's PNG and within 11% of cwebp -lossless -z 9. Pixels are identical.
  • --optimize for the smallest PNG and APNG: a new flag on apply, generate, animate, compare, batch and preset save. It searches palette orders and PNG filters and compresses with Zopfli, so files come out 3–25% smaller and match oxipng -o max -Z to within 0.3%. Encoding takes a few seconds per image. Without the flag, output is byte-identical to v0.4.0. It's also recorded in recipes as export.optimize.
  • About 2× smaller rect SVGs: each colour's runs are now drawn as one stroked path. They render pixel-identically to before.
  • Circle and dot SVGs are 70–80% smaller gzipped: dots are now traced as arc paths in one <path> per colour instead of a <circle> per pixel.
  • TIFF and BMP are no longer raw 32-bit: TIFF is Deflate-compressed (an 800px image went from 2.5 MB to 32–80 KB). BMP uses a 1-, 4- or 8-bit palette when the image is opaque with at most 256 colours.
  • Linux ARM binaries: releases now include aarch64-unknown-linux-gnu, and install.sh and dith update support it.
  • Half-size binary: release builds now use fat LTO and are stripped (6.0 MB → 3.3 MB on Linux, and slightly faster).

Behavior change

  • SVG markup changed. Rect output now uses stroked <path>s instead of filled boxes, and circle/dot output uses arc paths instead of <circle> elements. Both render the same, but tools that parse the markup may need updating. Uncompressed dot SVGs are 9–15% larger raw; the savings show up once the file is gzipped.
  • BMP and TIFF layouts changed. BMP is written at a lower palettized bit depth and TIFF as Gray8, RGB8 or RGBA8 with Deflate. Pixels are unchanged.
  • WebP encoding is slower: 30 ms to about 1 s for images up to 1200×800, and several seconds for very large images with more than 16 colours.
  • --emit-recipe JSON now always includes "optimize" in its export section.

Install / update

curl -fsSL https://raw.githubusercontent.com/lassejlv/dith/main/install.sh | bash
# or
dith update

v0.4.0

Choose a tag to compare

@capy-ai capy-ai released this 22 Nov 16:25

What's new

  • Much smaller PNGs: dithered images are now saved as indexed PNGs at the smallest bit depth the palette allows (1, 2, 4, or 8-bit), instead of full 32-bit RGBA. A 1024×1024 sphere went from 449 KB to 57 KB, a Game Boy mesh from 378 KB to 4 KB, and a PICO-8 noise texture from 2.9 MB to 207 KB. This covers generate, apply, batch, spritesheets, and --frames-dir. Pixels are unchanged.
  • Much smaller APNGs: all frames share one compact palette, and each frame after the first stores only the region that changed, the same way GIFs already did. A 24-frame 400×400 sphere loop went from 633 KB to 193 KB, smaller than the equivalent GIF.
  • About 4× smaller SVGs: --svg-shape rect now writes one compact <path> per color instead of a <rect> per run (a 512×512 sphere went from 1.4 MB to 351 KB). Circle and dot SVGs are about 13% smaller.
  • Clear error for mixed frame sizes: an APNG built from frames of different sizes now fails with a message that names the mismatched frame.
  • Skill docs updated: PNG is now usually the smallest still format, and the hero recipe writes .png instead of lossless .webp, which is now about 3× larger.

Behavior change

SVG rect output now uses <path> elements rather than <rect> elements, and saved PNGs use indexed or RGB color types instead of always RGBA. Both render identically, but tools that parse the markup or expect RGBA PNGs may need updating. Saving very large, noisy PNGs is slightly slower because of the stronger compression.

Install / update

curl -fsSL https://raw.githubusercontent.com/lassejlv/dith/main/install.sh | bash
# or
dith update

v0.3.0

Choose a tag to compare

@lassejlv lassejlv released this 21 Nov 13:00

What's new

  • Much smaller animated GIFs: frames are now delta-encoded, so each frame after the first stores only what changed. Animations with static areas shrink dramatically (an 800×600, 36-frame blue-noise sphere went from 2.3 MB to 250 KB); GIFs where every pixel changes stay about the same size.
  • dith animate --max-size 2MB: set a file-size budget (500KB, 1.5MiB, or bytes). dith shrinks the frame dimensions, keeping frame count and fps, until the output fits, and reports size_fit_scale in the JSON.
  • Motion is documented: dith list generators --json now has a motion field describing what each pattern does when animated.
  • Temporal stability is documented: dith list algorithms --json now has temporally_stable. With --temporal locked, ordered screens, blue-noise, ign, and random keep static pixels identical; error-diffusion algorithms still shimmer around moving content.
  • Cleaner procedural highlights: the sphere's highlight now rolls off smoothly instead of clipping into a flat white patch.
  • Skill docs updated for all of the above.

Behavior change

With --preset, procedural sources (generate, animate <pattern>, compare --pattern, preview --pattern) now skip the preset's photo preparation (auto-levels, contrast, sharpen), which clipped clean gradients. Pass those flags explicitly to get the old behavior. Output for these commands differs from v0.2.0.

Install / update

curl -fsSL https://raw.githubusercontent.com/lassejlv/dith/main/install.sh | bash
# or
dith update

v0.2.0

Choose a tag to compare

@lassejlv lassejlv released this 21 Nov 12:43

What's new

  • Agent skill install without npx: install.sh detects installed coding agents (Claude Code, Codex, Cursor, Gemini CLI, OpenCode, GitHub Copilot, Windsurf, Factory Droid, shared ~/.agents), asks for confirmation, and copies the dith skill into each one. Use --yes (or DITH_YES=1) to skip the prompt, --no-skills to skip skills entirely.
  • dith update refreshes skills natively: after updating the binary it copies the release's skill into every detected agent, with no Node.js required. The JSON report lists the agents in skills_agents.
  • Much more detailed agent skill: style guide, craft rules, verification checklist, full CLI reference with JSON report fields and error codes, a catalog of presets/palettes/algorithms/generators, and ~20 tested recipes (web heroes, OG cards, logo SVGs, CSS spritesheets, reveal GIFs, brand presets, batch export).

Install / update

curl -fsSL https://raw.githubusercontent.com/lassejlv/dith/main/install.sh | bash
# or
dith update

v0.1.0

Choose a tag to compare

@lassejlv lassejlv released this 21 Nov 12:25