SVG · 14 tools · nothing uploads

Trace a raster image to SVG

Trace a PNG, JPEG or WebP into an SVG of filled paths with imagetracerjs. Colors are posterized to a palette first; there is no way back to the original pixels once vectorized.

Input

Options

Trace a raster image to SVG converts a PNG, JPEG or WebP to filled vector paths with imagetracerjs, saved with a -traced suffix. Preset picks detailed, curvy or posterized as a starting point; colors, pathomit and cornerThreshold override its palette size, speckle filter and corner fit. Once traced, the source pixels cannot be recovered.

Questions

What image formats can I trace?

PNG, JPEG or WebP. The file is decoded to raw pixels first, so the input format only matters for how it gets read in, not for how the trace itself works.

What do the presets mean?

detailed and curvy are imagetracerjs own named presets; posterized maps onto imagetracerjs posterized2 preset specifically, which blurs slightly before quantizing colours, closer to what most people mean by a posterized trace than a flat two colour one.

What do colors, pathomit and cornerThreshold control?

colors sets the palette size traced shapes are quantised onto; pathomit drops any traced shape smaller than that many pixels, filtering out speckle; cornerThreshold controls how tightly lines and curves are fit, with a lower number keeping sharper corners. Leaving any of them blank uses the chosen presets own default for that setting.

Can I get the original pixels back after tracing?

No. Colours are posterized to a palette as part of the trace, and the result is a set of filled vector paths with no stored link back to the source pixels, so the conversion only runs one way.

What happens if the image traces to nothing?

It refuses with a message naming the file, since a blank or fully transparent image produces an SVG with no path elements at all, which is treated as a failed trace rather than a valid empty result.

Compare

ToolRuns on the CLILive as you type
Trace a raster image to SVGYesNo
Optimize SVGYesNo
SVG to PNGYesNo
SVG to PDFYesNo

Related SVG tools