Effects / Dither
Stucki
Stucki dithering is a modified version of the Jarvis-Judice-Ninke algorithm with adjusted coefficients. It produces high-quality results with slightly sharper output compared to Jarvis, making it excellent for detailed images.
dither-stuckiFreeEffect ID: dither-stucki
Example Configuration
stucki.json
{
"effectId": "dither-stucki",
"dither": {
"pattern": "stucki",
"pixelation": 4,
"paletteId": "monochrome",
"colors": ["#000000", "#ffffff"],
"brightness": 1,
"contrast": 1,
"threshold": 0.5
}
}Settings
| Property | Type | Default | Description |
|---|---|---|---|
pattern | string | "stucki" | Dither pattern algorithm |
pixelation | number | 4 | Point size (1-10) |
paletteId | string | "monochrome" | Color palette ID |
colors | string[] | ["#000", "#fff"] | Color array (dark to light) |
brightness | number | 1 | Brightness adjustment (0.5-2) |
contrast | number | 1 | Contrast adjustment (0.5-2) |
threshold | number | 0.5 | Error diffusion strength (0-1) |
How It Works
Stucki uses a 5×3 error diffusion matrix:
X 8/42 4/42 2/42 4/42 8/42 4/42 2/42 1/42 2/42 4/42 2/42 1/42
Key characteristics:
- Wider spread (5 pixels) than Floyd-Steinberg
- Modified coefficients produce sharper results than Jarvis
- Excellent detail preservation
- Good balance between quality and visual noise
When to Use Stucki
- Detailed photographs - Preserves fine details well
- Sharp edges - Better edge definition than Jarvis
- Technical images - Good for diagrams and text
- Higher color counts - Works well with 4+ colors
API Usage
render-request.json
POST /api/v1/render
{
"state": {
"canvas": {
"aspectRatio": "16:9",
"backgroundColor": "#1a1a1a"
},
"layers": [...],
"selectedLayerId": null,
"effect": {
"effectId": "dither-stucki",
"enabled": true,
"dither": {
"pattern": "stucki",
"pixelation": 4,
"paletteId": "gameboy",
"colors": ["#0f380f", "#306230", "#8bac0f", "#9bbc0f"],
"brightness": 1,
"contrast": 1,
"threshold": 0.5
}
}
},
"format": "png",
"width": 1920,
"height": 1080
}Tips
- Try Stucki when Floyd-Steinberg produces too much visible patterning
- Good middle ground between Atkinson (lighter) and Jarvis (smoother)
- Works well with high-contrast images
- Slightly slower than simpler algorithms but worth it for quality