img2dxf — Image to DXF

img2dxf — Image to DXF

Type:

Desktop tracer for laser cutters

Stack:

Python 3.10+, Tkinter, PyInstaller

Output:

DXF R12 / R2000 / R2010, SVG

Most image-to-vector tools are built for print, and a laser cutter wants something else entirely: closed outlines, holes that stay holes, real millimetres, and paths that account for the width of the beam. img2dxf turns a PNG or JPEG into a cut file that LightBurn, RDWorks and LaserCAD import at true scale — type 80 mm wide and the part comes off the machine 80 mm wide. It ships as a single Windows executable with no Python to install, and the same engine is exposed as a CLI for batch work.

The quality ceiling is not where it looks. Thresholding rounds every outline to the pixel grid, so tolerance is never the limiting factor — resolution is. Supersampling lifts that ceiling; a straightening pass separates a pixel staircase from a genuine curve by how the run bends rather than how far it strays, so letter stems come out dead straight and curves of any radius are left alone; and corner detection marks the turns smoothing must not touch, which is what makes it safe to soften the bowl of an O without rounding the corners of an L. Together they cut edge error against the original artwork by 2.2x while using 60% fewer vertices, and curves are written as real arcs instead of thousands of tiny segments.

The rest is machine awareness, which is what decides whether a file is actually usable. Kerf compensation offsets outlines and holes in opposite directions so both keep their drawn size. Holding tabs leave uncut bridges so small parts do not drop through the bed mid-pass. Cut order puts holes before outlines and typically removes 60% of head travel, bed-size checks catch a job before it fails on the machine, and photographs split into tone bands as one layer each for power and speed. There is a calibration piece too, because the honest way to find your kerf is to cut a part and measure it.

Built for the beam, not the printer

Closed outlines, holes that stay holes and true millimetres — a DXF that LightBurn, RDWorks and LaserCAD open at the size you typed, from one .exe with nothing to install.

img2dxf tracing a badge logo, settings on the left and the cut paths drawn over the artwork
The img2dxf desktop application icon

2.2x closer, 60% fewer points

Tolerance was never the limit — the pixel grid was. Supersampling, staircase-aware straightening and corner detection raise the ceiling, and arcs replace the segment soup.

Plate: kerf

Kerf, tabs and cut order

The beam removes material, so outlines and holes are offset in opposite directions. Tabs hold small parts in the sheet, and holes are cut before the outline that frees them.