software

How to Convert PNG to SVG for Pen Plotting (the Right Way)

Plotters draw vectors, not pixels. Here's how to convert a PNG to a clean, plottable SVG — when to trace, when not to, and how to optimize the result.

By Pen Plotter Kit Team ·

How to Convert PNG to SVG for Pen Plotting (the Right Way) — png to svg for plotting illustration

A plotter can’t draw a PNG. It draws strokes along vector paths, which means any pixel-based image — PNG, JPG, screenshot — has to become an SVG of lines before it can be plotted. Done well, converting PNG to SVG for plotting gives you clean, efficient art. Done carelessly, you get a tangled mess that plots for an hour and looks worse than the original.

Step 1: Decide if tracing is even right

Before converting, ask what the image is:

  • Line art, logos, simple shapes → trace well; great candidates
  • Photos with smooth gradients → tracing into filled shapes plots terribly; you need a line-based interpretation (edge trace or hatching) instead
  • Already-vector art exported as PNG → find the original vector if you can; re-tracing always loses quality

Step 2: Trace in Inkscape

Inkscape (free) is the standard tool. Open your PNG and use Path → Trace Bitmap. Two modes matter for plotting:

  • Centerline tracing — follows the middle of lines, producing single strokes. Ideal for line art and the most plotter-friendly option.
  • Edge detection — outlines shapes. Good for bold graphics.

Avoid the default multi-color “filled” trace for plotting — it creates stacked filled shapes a pen can’t meaningfully draw.

Step 3: Clean up the paths

Auto-tracing is messy. After tracing:

  • Delete stray specks and background artifacts
  • Simplify paths (Path → Simplify) to cut excess nodes
  • Convert any remaining fills to strokes

Step 4: Optimize with vpype

This is the step most people skip and shouldn’t. A traced SVG can contain thousands of tiny, randomly ordered paths. Run it through vpype:

vpype read traced.svg linemerge --tolerance 0.5mm reorder crop 0 0 297mm 420mm write plot.svg

linemerge joins paths that share endpoints; reorder sorts strokes to minimize pen travel. This routinely cuts plot time in half and reduces pen lifts.

Step 5: Preview before plotting

Use vpype ... show or Inkscape’s outline view to confirm the SVG is built from clean lines, not filled regions. What you see in outline mode is essentially what the pen will draw.

A note on photos

To “plot a photo,” don’t trace it into shapes. Instead, convert it to a line representation: an edge trace, a flow-field rendering, or a hatching/stippling effect (vpype plugins and tools like hatched do this). The result reads as the photo while being something a pen can actually draw — and it looks far more like intentional plotter art than a flat vectorized blob.

Frequently asked questions

Can a pen plotter draw a PNG or JPG directly?

No. Plotters draw strokes along vector paths, so any raster image (PNG, JPG) must first be converted to an SVG made of lines and paths. Sending a raster file results in nothing usable.

What's the best way to convert PNG to SVG for plotting?

For line art and logos, use Inkscape's Trace Bitmap with the centerline or edge-detection mode. For photos, convert to a line-based representation (edge trace or hatching) rather than a filled trace, then clean and optimize in vpype.

Why does my traced SVG plot so slowly?

Auto-traced files contain thousands of tiny, unordered paths. Running the SVG through vpype to merge lines and reorder strokes dramatically cuts plot time and pen lifts.