Tutorials 6 min read

Getting Clean Vectors From a PNG

Auto-tracing turns pixels into paths, but the quality of the result is set almost entirely by the image you feed it. Settings can only refine what is already there.

Vextrude Team

Updated Aug 21, 2026

Tracing a PNG into clean SVG vectors — Vextrude

Auto-tracing turns pixels into paths, but the quality of the result is set almost entirely by the image you feed it. Settings can only refine what is already there.

The Source Image Decides Everything

A tracer looks for boundaries between regions of colour. Anything that blurs those boundaries becomes a lumpy path.

Resolution first. Below about 500 pixels across, edges are only a few pixels wide and the tracer has no clean boundary to follow. Curves come out faceted. More resolution genuinely helps here, up to a point — beyond roughly 2000 pixels you are mostly tracing sensor noise.

Compression second. JPEG stores images in 8×8 blocks and creates ringing around sharp edges — exactly where a logo's outline sits. Those artefacts are real pixel data to a tracer, and they become bumps in the path. A PNG of the same logo traces dramatically cleaner. If you only have a JPEG, a slight blur before tracing often produces a better result than the original, because it smooths the ringing.

Anti-aliasing third. The soft grey pixels that make edges look smooth on screen are ambiguous to a tracer. It has to decide where inside becomes outside, and that decision is the threshold.

Threshold Is the Setting That Matters

For a two-colour trace, the threshold is the brightness value where the tracer switches from "background" to "shape". Everything darker becomes filled; everything lighter is discarded.

Set it too low and thin strokes vanish, because their anti-aliased pixels never reach the cutoff. Set it too high and the shape bloats, picking up the soft halo around every edge, and small counters — the hole in an "e" — close up entirely.

The reliable method is to bracket it. Trace at a low, middle and high value and compare the three against the original, paying attention to the thinnest feature and the smallest hole. The best setting is usually the highest one where counters are still open.

Prepare the image first:

Increasing contrast before tracing is often more effective than adjusting the threshold afterwards. Pushing a near-black logo to true black and a near-white background to true white removes the ambiguity entirely, and then any reasonable threshold works.

Node Count Against Fidelity

Every tracer exposes some form of smoothing or simplification, and it controls a direct trade: fewer nodes means smaller files and cleaner curves, but rounded-off corners.

The failure mode at each end is distinct. Too little simplification and a straight edge becomes a wobbling path with a node every few pixels, following compression noise faithfully. Too much and sharp corners round over — a hexagon starts looking like a circle.

Judge it by looking at corners rather than curves. Curves tolerate simplification well; corners are where over-smoothing becomes obvious, and they are usually what makes a logo recognisable.

Node count matters more than usual if the SVG is heading for 3D, because every node becomes vertices in the mesh — multiplied by front face, back face and the wall between them.

Colour Tracing Needs a Plan

Multi-colour tracing quantises the image to a limited palette, then traces each colour region as a separate path. The number of colours is the setting to think about.

For a flat logo, use the actual number of colours in the design — usually two to five. Asking for sixteen on a three-colour logo produces a dozen near-duplicate paths describing compression artefacts.

Photographs are a different proposition. They have no flat regions, so a colour trace produces hundreds of overlapping shapes approximating a gradient. The result can look striking as an illustration, but it is not a faithful conversion and the file will be large.

Note that traced colour regions typically overlap rather than tile: each path is drawn as a full shape with later colours painted on top. That is fine on screen and a problem for 3D, where each overlapping shape becomes its own solid.

Tracing Specifically for 3D

If the SVG is going to be extruded, three extra requirements apply beyond looking correct on screen.

Trace to fills, not strokes. Some tracers produce centreline output — a single path following the middle of each line. Excellent for engraving or pen plotting, useless for extrusion, because a line with no width encloses no area.

Prefer fewer, larger shapes. A trace producing 40 tiny fragments where the design has 3 shapes will produce a mesh with 40 separate solids. Union them before converting.

Simplify harder than you would for print. A path with 5,000 nodes is unremarkable in a print workflow and produces an unwieldy STL. It is worth losing a little fidelity to halve the node count.

Finally, check the result with fills turned off. Anything that disappears will not extrude — which is the fastest way to catch a centreline trace before you have wasted time on it.


Trace an image now

Convert PNG, JPG, GIF, BMP or WebP to scalable SVG, entirely in your browser.

Open Image to SVG