Why a laser needs dithering
In a normal photo engraving the laser scans line by line at one power. At every dot it either fires or it does not. So the file it reads is 1-bit: each pixel is black (burn) or white (leave the material alone). A photo has 256 shades of gray. Dithering is how those shades fit into two.
It works the way a newspaper photo works. From a normal viewing distance your eye blends nearby dots: an area with many burned dots reads as dark, an area with few reads as light. Every dithering method answers one question: where should the dots go?
One exception: if your laser has a grayscale mode that changes power per pixel, or you are doing 3D engraving, choose "No dithering (grayscale)" in the app and let the laser make the grays.
Threshold: one cut at 50%
The simplest answer is a threshold. Each pixel is judged on its own: darker than half burns, lighter stays. That is exactly what "Threshold 50%" does in the app.
It is perfect for logos, text and line art, which are black and white already. On a photo it fails: soft shading collapses into flat black and white shapes, and a smooth gradient becomes one hard edge. Switch the demo below to the gradient and pick Threshold to see it.
Try it: five ways to turn gray into dots
Pick a source and a method. The dots are computed in your browser with the same maths as the app's menu items.
Floyd–Steinberg. Error goes to 4 neighbours. Fast and sharp, with a slight wormy texture in flat areas.
Computed live at 160 × 160 pixels and enlarged so you can see every dot. A real file has far more dots per inch, so it looks much smoother on the material. Ultra is not in this demo; try it in the app.
Error diffusion: pass the mistake on
Error diffusion goes through the image one pixel at a time, left to right and top to bottom. Each pixel is rounded to black or white. The difference between the gray it should be and the dot it got is the error, and it is shared out among neighbours that have not been visited yet. Those neighbours get a little darker or lighter to make up for it, so the overall tone survives.
A tiny worked example. Take a flat gray of 100 on the 0 to 255 scale (0 is black), about 39% light. The first pixel is darker than half, so it burns (0). It came out 100 too dark, so the error is +100. Floyd–Steinberg hands that error out like this:
| 100 → 0 (this pixel) | +44 | |
| +19 | +31 | +6 |
How the first pixel's error of +100 is split: 7/16 to the right, then 3/16, 5/16 and 1/16 to the row below.
| Pixel | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| Gray when visited | 100 | 144 | 51 | 122 | 154 | 56 |
| Dot | 0 (burn) | 255 (white) | 0 (burn) | 0 (burn) | 255 (white) | 0 (burn) |
| Error | +100 | -111 | +51 | +122 | -101 | +56 |
| Passed right (7/16) | +44 | -49 | +22 | +54 | -44 | +24 |
One row of the same gray, following only the share that goes to the right (the shares for the next row are left out to keep it short).
Two of the six dots stay white, close to the 39% the gray asks for, and over a whole image the average comes out right. Methods differ in how far they spread the error:
- Floyd–Steinberg
- 4 neighbours (7, 3, 5 and 1 sixteenths). Fast and sharp, the classic. In flat areas it can leave short wavy chains of dots, known as worms.
- Jarvis–Judice–Ninke
- 12 neighbours over two rows (weights out of 48). Smoother and less wormy, a little softer.
- Stucki
- The same 12 neighbours with different weights (out of 42). Very smooth gradients. Our Cork preset uses it.
- Atkinson
- From the early Macintosh. Only 6/8 of the error is passed on, to 6 neighbours. Highlights stay clean and contrast goes up, but shadow detail is lost.
Our engine also runs every second row right to left (serpentine scanning). That breaks up the diagonal streaks a one-direction scan leaves behind.
Ordered dithering: a fixed Bayer pattern
Ordered dithering never looks at neighbours. Each pixel is compared with a threshold from a small grid that repeats across the image, the Bayer matrix. In the 4 × 4 grid, the 16 thresholds are arranged so that as the gray darkens, dots switch on in an even, spread-out order.
Because every dot follows the same pattern, flat fills come out perfectly even: backgrounds, badges, shaded lettering, anything that should look like a clean texture. On some surfaces a regular pattern also burns more predictably than scattered single dots, which is worth a strip on a test card. On photos the grid shows as a cross-hatch and fine detail is lost. "Bayer 8×8 (ordered)" is the finer version.
Which one to pick
Start from the subject, then let the material have a say:
- Portraits and people
- "Ultra (optimized)", the default. If you need a classic method for another program, Jarvis–Judice–Ninke or Stucki keep skin smooth.
- Pets and fur
- Ultra. For whiskers and fine hair, add the Crisp or Max detail Look. Floyd–Steinberg is the sharp classic alternative.
- Logos, text and line art
- No dithering at all: "Threshold 50%" keeps edges solid. For the crispest result, trace the logo to vectors in your laser software.
- Bold graphics and fills
- "Bayer 4×4 (ordered)" or "Bayer 8×8 (ordered)" for an even, deliberate texture.
- Small, punchy pieces
- Atkinson, if you accept losing some shadow detail.
- Coarse surfaces
- On cork the grain hides single dots, so our preset uses Stucki for smooth tone. See Materials and invert for every material's default.
Every material preset starts at Ultra except cork. You can always change it in the Dither menu before you press "Prepare image".
How DPI and dithering work together
Dithering decides which dots burn. DPI decides how big the dots are and how close together. At 254 DPI one dot is 0.1 mm, about the spot of a typical diode laser. If the DPI is lower than your spot can draw, the pattern shows. If it is much higher, neighbouring lines overlap, dots merge and the picture burns darker and muddier.
The order matters too. The app first resizes the photo to the print size at your DPI and only then dithers, so one pixel of the file is exactly one laser dot. Never scale a dithered file afterwards: resizing a 1-bit image breaks the pattern into clumps and stripes. DPI explained shows how to find the right DPI for your laser.
What our Ultra does differently
Ultra is Direct Binary Search (DBS), a method from halftoning research (Analoui and Allebach, 1992). It starts from a Floyd–Steinberg result and then improves it. For each pixel it tries flipping it, or swapping it with a nearby dot of the opposite colour, and keeps the change only if the result, seen through a model of the eye and the laser spot, gets closer to the photo. A second term in that model penalises ripples, which keeps flat areas smooth and edges clean. It repeats the passes until almost nothing changes, at most 10.
The result has no worms or line patterns, and the tones follow the photo closely. The cost is time: a few seconds instead of a blink. The honest trade-off is that very thin, faint features such as single whiskers can look a little softer than with a punchier method, which is what the Crisp Look is for.
Try it in the app
Drop a photo into One Click, pick your material and press "Prepare image". Ultra is already selected. To compare methods on your own photo, change the Dither menu and prepare again, or make a dither strip with the test card tool.