Rekha

From PNG or JPG to DXF: preparing artwork for a laser cutter

How to turn a picture into a DXF a laser or CNC machine can follow: choosing the artwork, getting the size right, and what to check before you cut.

A laser cutter does not look at a picture. It follows lines. So before a logo, a sign or a pattern can be cut or engraved along its outline, the image has to become geometry, and for most machines that means a DXF file. This guide covers getting from a PNG or JPG to a DXF that cuts the way you expect.

What is a DXF file, and why do cutters want one?

DXF is a drawing exchange format from the CAD world. It stores lines, arcs, circles and curves with real coordinates. Nearly every CAD and CAM program reads it, which is why laser cutters, CNC routers, plasma tables and vinyl plotters accept it.

A PNG or JPG stores pixels. A machine can raster-engrave pixels, sweeping back and forth like a printer, but it cannot cut along them. For cutting and for crisp vector engraving, it needs paths. If the distinction is new to you, start with raster vs vector.

Which images convert well?

The best candidates are simple and high in contrast:

  • Black artwork on a white background: logos, silhouettes, lettering, line drawings.
  • Flat-colour designs where each colour will be a separate cut or engraving pass.
  • Clean scans of hand drawings.

Photographs do not make useful cutting paths. If you want to engrave a photo, use your laser software’s raster mode instead.

Step 1: Prepare the image

Small problems in the picture become real problems in the material.

  1. Use the largest copy you have. More pixels mean smoother outlines.
  2. Crop to the artwork. Remove borders, shadows and anything you do not want cut.
  3. Make it clean. For a scan, raise the contrast so the paper is white and the ink is black.

Step 2: Trace and choose DXF

Open the studio, drop the image in and choose a preset. Black and white suits most cutting work, and “auto” threshold picks the cut-off between black and white for you. Then choose DXF as the download format. The DXF options appear:

  • Units. Millimetres, inches or pixels.
  • Pixels per inch. This decides the physical size, so it is the setting to get right.
  • Curves. Arcs where the tracer found them, polylines or splines.
  • Tolerance. How far a flattened curve may stray from the true one.

Step 3: Get the size right

A picture has no physical size until you give it one. The arithmetic is simple: size = pixels ÷ pixels per inch.

An image 1200 pixels wide at 300 pixels per inch becomes a drawing 4 inches wide, which is 101.6 mm. The same image at 96 pixels per inch would be 12.5 inches wide. If you know how wide the finished piece should be, work backwards: divide the pixel width by the width you want in inches, and enter that number.

You can also ignore this and scale the drawing in your laser software. Either way, measure one known dimension before you cut.

Step 4: Choose curves your machine understands

Not every controller reads every kind of curve.

SettingWhat is writtenUse it when
Arcs where foundTrue arcs and circles, polylines elsewhereMost laser and CNC work. Turn on refine so arcs are recognised
PolylinesShort straight segments within your toleranceOlder software, or anything that rejects curves
SplinesSmooth spline curvesCAD programs where you will keep editing

Arcs matter more than they seem to. A circle written as a real circle cuts in one smooth motion. The same circle as two hundred tiny lines can make the machine stutter and leave a faceted edge.

Step 5: Check before you cut

Open the DXF in your laser or CAM software and look for four things:

  1. Scale. Measure something you know.
  2. Closed shapes. Outlines must be closed for the software to tell inside from outside.
  3. Stray specks. Dust in a scan becomes tiny shapes. Raise “Drop specks below” and trace again if you find any.
  4. Layers. Outlines are grouped on one layer per colour, which you can map to cut, score and engrave settings.

Then run a test on scrap. It is cheaper than the real material.

Common questions

Can I convert a JPG to DXF directly?

Yes. The image is traced and the DXF is written in one step, from the tracer’s own lines and arcs. There is no need to make an SVG first.

Does this work with LightBurn?

LightBurn imports DXF files, as do most laser, CNC and CAD programs.

Why is my imported drawing the wrong size?

Almost always units or pixels per inch. Check that the units in the DXF match what your software assumes on import, then check the pixels-per-inch value.

Is DXF export free?

It is available in the hosted studio. The open-source build of Rekha writes SVG, PDF and EPS, and DXF is part of the commercial licence.

Keep reading