At Kloniko customers upload their own images to print on a figure: a face, a logo on a torso, a pattern on the legs. In the configurator the image looks right. Sometimes the printed part did not: stubble, soft shadows and blush came out as whitish specks.

The image was fine. The preview was wrong.

What a UV printer does with transparency

A UV printer does not blend ink with the surface. To make colours show on a coloured part, it first lays down a white underbase wherever the image has any pixel, and then prints the colour on top.

The underbase has no "30% opacity". A pixel with alpha 60 out of 255 gets 100% white under it and only a little colour over it.

On screen, the browser blends that pixel with the skin-coloured part, and you see a soft shadow. On the part, you get an almost white dot.

Simulating the print

So we render two versions of every uploaded image in the browser, on a canvas:

// what the screen shows: normal alpha blending with the part colour screen = src * a + part * (1 - a) // what the printer makes: colour over a white base, wherever a > 0 uv = src * a + white * (1 - a) 

If the two differ a lot over a noticeable area, the customer has a problem they cannot see. Our test for it is simple: a grid of semi-transparent brown dots on a skin-coloured part must come out clearly lighter in the UV version than on screen.

A solid shape with an anti-aliased edge must not trigger the warning. One row of soft pixels around a logo is normal, and warning about it would train people to ignore the dialog.

Fixing it for the customer

Showing a warning is not enough, most customers cannot fix an image themselves. So the dialog offers a corrected version next to the simulation:

// alpha below the threshold: drop the pixel // alpha above it: make it solid, pre-blended with the part colour if (a < threshold) out = transparent else out = { rgb: src * a + part * (1 - a), a: 255 } 

The pixel keeps the colour the customer saw on screen, but it is now opaque, so the white base is fully covered. The shadow looks like a shadow again.

After any scaling we harden the alpha once more, so it is only 0 or 255. Resizing brings semi-transparent edges back.

The second problem: tiny dots

Very small separate dots (a few pixels, freckles, noise from a bad cut-out) either do not print or print as specks. We find connected groups of pixels below a minimum size and offer two choices: remove them or enlarge them to a printable size. A large shape next to them stays untouched.

What we learned

  • If production differs from the screen, simulate production in the preview. The customer should approve what will be made, not what was uploaded.
  • Offer the fix, not just the warning.
  • Put the check on every upload path. We wrap each one in the same checkUvPrint call, a new path without it is a bug.
  • Cover it with tests on tiny synthetic images: a 2×1 pixel image is enough to pin the alpha rules.

We build print-ready configurators and web-to-print tools at Kastomiko: product configurator development, web-to-print software.