PNG to SVG Tracer

Guides Tutorials

Vectorizing a Scanned Drawing: Scanning Tips That Help

A scan is the best starting point for tracing a drawing. It is flat, evenly lit and sharp, which a phone photo rarely is. But a bad scan still traces badly, and most of the fixes happen at the scanner, not in the tracer.

Two traces of the same ink drawing, one with a solid black block where the scan had a shadowed edge and one with only the ink lines
Same drawing, same trace settings. Only the scan changed.

Set up the scan before you press the button

Scan in color or grayscale, not black and white. The scanner's own black and white mode throws away detail before you ever see it, and you cannot get it back. Scan in color or grayscale and let the tracer make the black and white decision.

Use 300 dpi for most drawings. Go to 600 dpi for small or very fine work, such as a drawing that is only a few inches wide. Higher than that mostly gives you a bigger file, not a better trace.

Save as PNG. A PNG does not add compression noise. If your scanner only gives you JPG, use the highest quality setting. The tracer takes PNG, JPG, WebP, GIF and BMP.

Turn off automatic fixes. Auto contrast, descreen and sharpen filters can add halos and texture around lines. Plain and unprocessed is what you want.

Get the page flat

Anything that lifts off the glass makes a shadow, and a shadow is the number one cause of a bad scan trace.

  1. Clean the glass with a dry cloth. Dust becomes specks.
  2. Close the lid fully. A propped lid lets light in and tints the paper.
  3. For a sketchbook, scan the page flat and keep the spine out of the picture if you can. A bound edge curves away from the glass and goes dark.
  4. Leave a small margin of blank paper around the drawing so you can crop cleanly.

In the picture above, the left trace has a solid block because the scan had a dark edge. The tracer sees a dark area and saves it as a dark shape, just like it would a line. The settings were identical in both traces.

Crop and straighten first

Crop to the drawing with a thin margin. Rotate the page if it is crooked. Do this in any image editor, or in your scanner software, before you trace. Tracing a straight, cropped image also means a smaller SVG with fewer stray shapes near the edges.

Trace it

  1. Open the image tracer and drop in your scan.
  2. Choose Black and white shapes for ink drawings and line art.
  3. Move the Threshold until the thin lines are complete but the paper has not started to appear. For dark ink on clean paper the default of 128 is often fine. Pencil and light pen need a higher value, as covered in how to trace a pencil sketch.
  4. Raise Remove small specks a few steps to clear dust and grain.
  5. Raise Smoothing if the lines look shaky. If they look jagged instead, this fix for jagged traces shows what to change.
  6. Download the SVG.

Colored drawings are different. Use a color style and a low number of colors, then check the preview. A watercolor or heavily shaded drawing will become flat shapes, because a trace does not keep soft gradients.

What to check in the preview

When the scan cannot be fixed

If the original is faded, creased or stained, the scan will carry all of it. You have two choices. Raise the threshold and accept some loss, or trace the cleanest parts and redraw the rest as vector shapes in an editor. The first is faster. The second gives a better result for a drawing you will use many times.

Bold ink or fine lines?

Heavy ink lines survive almost any scan. Hairlines and light pencil do not, so scan those at a higher dpi and expect to raise the Threshold. For a worked example with bold line art, see tattoo flash to SVG.

Using the file

A traced scan is one color, so you can recolor it in one step in an editor such as Inkscape. Check the SVG over a colored shape before you use it, to make sure there is no white box behind the lines. If you plan to cut it, a drawing made of thin lines turns into thin, fragile cut shapes, so test a small piece first. The SVG tracer page covers the options in more detail.

If the drawing is someone else's work, make sure you have the right to reproduce it before you trace it.

TagsSVGTracingScanningHandwriting

Related tools

Keep reading