Inkscape Trace Bitmap: which mode to use, and how to get a DXF out of it
Updated
Trace Bitmap is the tool in Inkscape that turns a PNG or JPG into vector paths. Most tutorials stop once the trace looks good on screen. If the goal is a cut file, you also need to know which mode gives closed outlines, how to clean the result, and what to set when you save as DXF. This guide covers all of it for Inkscape 1.x.
Open Trace Bitmap and trace an image
Trace Bitmap only works on pixel images. If your file is already an SVG, skip tracing: the shapes exist and you only need to export.
- File, Import (or just drag the PNG onto the canvas). Choose Embed when asked.
- Click the image to select it.
- Path, Trace Bitmap (Shift+Alt+B). The dialog opens as a docked panel on the right in Inkscape 1.x.
- Pick a mode, tick Live Preview if you want to see the result before applying, and adjust.
- Click Apply. The traced vector is placed directly on top of the original image.
- Drag the new shape aside, or select the image underneath and delete it.
The dialog changed between versions. In 0.92 it was a separate window with three tabs. In 1.x the options are combined into one panel with a Single scan and a Multiple scans section. The names of the modes below are the same.
Which mode to pick
| Mode | What you get | Good for cutting? |
|---|---|---|
| Single scan, Brightness cutoff | One filled shape per dark region, split by a threshold | Yes. This is the one to use for logos, silhouettes and stencils |
| Single scan, Edge detection | Only the outlines of shapes, drawn as thin strokes | Rarely. Gives a ring around each shape, not a closed part |
| Single scan, Colour quantization | Fills split along colour borders | Only if you want to separate colours into parts |
| Single scan, Centerline tracing (autotrace) | Open paths along the middle of thin strokes | For engraving or pen plotting handwriting and line art, not for cutting a part |
| Multiple scans (brightness steps, colours, grays) | A stack of separate objects, one per scan | Only for artwork. For a cut file you want one shape, not ten |
For a laser cutter or CNC, almost every job is Single scan with Brightness cutoff. The other modes exist for artwork and illustration.
Settings that matter for a clean cut outline
Brightness cutoff has one main control, the threshold. Pixels darker than the threshold become shape, lighter pixels become background. Move it until the preview matches what you want to cut: too low and thin strokes disappear, too high and the background fills in.
- Invert image. Tick it if your artwork is light on a dark background, otherwise you trace the background instead of the shape.
- Reduce noise (Multiple scans section). Useful on a photo or a JPG with compression artefacts, since it smooths the image before scanning.
- Suppress speckles (Options). Throws away blobs smaller than a given size. Turn it on when the preview shows stray dots, because each dot would otherwise become its own cut path.
- Smooth corners (Options). Rounds off sharp angles. Lower it for logos with intentional sharp corners, raise it for rough hand-drawn edges.
- Optimize paths (Options). Merges nearby curve segments so you get fewer nodes. Good for file size and for smoother cuts.
Press Update after changing anything if Live Preview is off. If the result looks like steps or blocks, the source image is too small. A tracer cannot invent detail that is not in the picture, so find a larger version before you fiddle with sliders.
Clean up before exporting
- Delete the original bitmap so only the traced shape remains.
- Select the shape and set the real width in mm in the toolbar (lock the ratio). Do this now, not after export.
- Use Path, Break Apart then Path, Combine if you need to separate or merge pieces. Holes in letters like A and O are part of the traced path, so Break Apart on a letter will fill them in.
- With the shape selected, switch to the Node tool (N): the status bar shows the node count. A trace with thousands of nodes can be slow in laser software. Path, Simplify (Ctrl+L) reduces them, at the cost of some accuracy.
- Remove any fill you do not need and check there is no leftover image or text. Convert text with Path, Object to Path.
Export as DXF
File, Save As, and choose a DXF type from the file type list. In Inkscape 1.x the one most people use is Desktop Cutting Plotter (AutoCAD DXF R14). Depending on the version you may also see an R12 variant. After you pick the name and save, an options dialog appears. The ones that matter:
- Use Document unit as base unit. Checked by default. Leave it checked if your document is set to mm, and uncheck it to pick a unit yourself (px, in, mm, cm, m, ft).
- Use LWPOLYLINE type of line output. On by default. Most laser and CAD tools read it well.
- Flatten Béziers. Off by default. DXF cannot store every kind of curve the way SVG does. If your cutting software shows missing or odd curves, try turning this on.
- Layer export. Choose all layers, visible only, or by name.
- ROBO-Master compatible spline output. Leave off unless you use that cutter.
Then check the size, because this is where most people get burned. Inkscape's DXF export has a long history of scale bugs when the document units and the base unit disagree, and reports show shapes coming out off by a factor like 25.4 / 96. Import the DXF into your laser software or CAD tool, measure the part, and compare it with what you set in Inkscape. If it is wrong, change the base unit option and export again.
Inkscape or a browser converter?
| Inkscape Trace Bitmap | Browser PNG to DXF converter | |
|---|---|---|
| Install | Desktop app | Nothing |
| Steps for a clean one-colour image | Import, trace, resize, clean up, save as, pick options | Drop, set threshold, set width in mm, download |
| Edit paths by hand | Yes, full node editor | No, open the DXF in another tool |
| Modes | Brightness, edges, colours, centerline, multi-scan | One: black and white threshold |
| DXF settings to get right | Base unit, LWPOLYLINE, Flatten Béziers | Width in mm, nothing else |
| Cost | Free | Free |
If you need to fix a trace by hand, merge shapes, add bridges to a stencil or trace in colour, Inkscape is the right tool. If you have a clean dark-on-light image and only want a cut-ready DXF at a known size, the PNG to DXF converter skips the export dialog and the unit question. It only does the black and white threshold, so it will not replace Inkscape for anything more involved. There is also a longer walkthrough of the laser cutting side in how to convert an image to DXF for laser cutting.
Questions
Where is Trace Bitmap in Inkscape?
Select the image, then open Path, Trace Bitmap. The shortcut is Shift+Alt+B. The image has to be a bitmap, not already a vector.
Which Trace Bitmap mode is best for a laser cutter?
Single scan with Brightness cutoff. It gives filled shapes with closed outlines. Edge detection and Centerline produce strokes and open paths, which are not what you want for cutting a part.
Why is my DXF the wrong size after exporting from Inkscape?
The base unit in the DXF export options and the document units disagree. Set the shape size in mm, export with the base unit set to match, then measure the imported DXF and adjust if needed.
Can Inkscape trace a JPG as well as a PNG?
Yes. Both are bitmaps. A JPG can have compression noise around edges, so use Suppress speckles or Reduce noise if the trace has stray dots.