Skip to content
Nemaworks

The demo

A bad logo, and what the pipeline does with it

This is not a customer’s artwork. Kestrel Plumbing & Gas does not exist — the logo was drawn for this page and then deliberately ruined by a script, so the run below is reproducible and belongs to nobody. Everything after the first image is real output from the real imaging service.

1 · What arrives

Four things are wrong with it on purpose, and all four are ordinary. It sits on an off-white ground rather than pure white. Every shape carries a thin keyline the customer never drew. The holes in the letters are enclosed. And it is a quality-45 JPEG, so every edge is ringing.

The supplied logo: a tap and the word KESTREL, on an off-white background with a soft shadow

source.jpg · 1600 × 900 · 47 KB

2 · Keying

The background comes off by flooding in from the edge. The ground was measured at rgb(241, 242, 237) rather than assumed to be white — that is the difference between removing a background and deleting a logo that happens to be pale.

The keyed logo on white, where it looks finished
The same keyed logo on black, showing the keyline surviving as a pale outline around every letter and the counter in R surviving as a solid patch
On whiteOn black

Drag the slider. Background 88.9% of frame · border uniformity 100%

Why it is checked on black

On white it looks done. On black you can see what actually survived: a pale keyline around every letter, and the hole in the R filled in solid. Both would print. On a dark garment the first would appear as an outline nobody asked for, and the second as a patch where a letter should be open.

3 · Trace

63 paths, no embedded bitmap. That second part is checked rather than trusted — an SVG that just wraps the original JPEG passes for a vector until somebody prints it at 210mm.

The traced vector on black. The keyline and the filled counter are still present, now as vector paths

traced.svg · 63 paths · is_really_vector: true

4 · Counters, and the part that stops

Every enclosed region gets numbered. Not judged — numbered. A counter and a genuine filled shape are geometrically identical, so there is no rule that separates them safely, and the software does not pretend otherwise.

The traced logo on black with every enclosed region tinted magenta and numbered. Region 29 is the counter in the letter R; most of the others are the keyline

59 candidates · none judged

Read this picture

29 is the hole in the R. It should be punched. Most of the rest are the keyline, and punching those would eat the letterforms. Neither of those calls is obvious from a coordinate, which is why the picture exists and why a person makes them.

What this run found in the software

Building this page broke the counter step, which seems worth saying out loud.

A bug, now fixed

The counter search was given the colour measured during keying, but it runs against the traced file — and tracing quantises. The ground measured at rgb(241,242,237) came back from the tracer at rgb(143,178,196), so the near-white rule matched nothing and the step reported zero counters on a logo that plainly has five. It now snaps to the nearest colour actually present and reports that it did. There is a regression test named after the failure.

Not a bug

Neither keyline step removes this keyline, and that is correct. The automatic remover only takes paths that are light and achromatic, because a halo is achromatic while a highlight carries the hue of whatever it sits on. This keyline picked up a blue cast, so it is left alone rather than guessed at — and it reaches a person, which is the point.