An STL file describes a closed surface made of triangles. An image is a grid of coloured pixels. Between the two lies a short chain of well-known algorithms, and this page walks through each link exactly as this tool runs it, so you can predict what your picture will turn into and fix it when it does not come out the way you expected.
Step 1: from colour to a yes-or-no mask
First the image is scaled down, if needed, to at most one megapixel. That is plenty for a logo at printing size and keeps the tab responsive on a phone. Every pixel is then reduced to a single brightness value, its luma, using the Rec. 709 weights (0.2126 red, 0.7152 green, 0.0722 blue), which follow how the eye perceives brightness.
The tool also has to know what the background is. It looks at the pixels along the border of the image, uses only the fully opaque ones and takes their median: a light border means a light background, a dark border a dark one. Semi-transparent pixels, such as the soft edge of a PNG logo, are blended over that background before anything else happens, so a half-transparent dark pixel counts as mid-grey rather than solid ink. Fully transparent pixels are always background.
When at least one pixel in a hundred is transparent, the image is treated as a cut-out and the threshold is not used at all: every pixel that is more opaque than transparent belongs to the shape, whatever its colour. A photo whose background was removed therefore gives its silhouette, not a map of its shadows. The Shape from control switches a cut-out back to brightness when the dark areas inside it are what you want.
Then comes the threshold, the single grey level that divides drawing from background. By default the tool uses Otsu's method (Nobuyuki Otsu, 1979), which examines the histogram of grey levels and chooses the split that maximises the variance between the two classes, which is the same as minimising the variance inside each. For a clean two-tone image the answer is obvious and Otsu finds it; for a scan with a greyish background it usually lands in a sensible place. When it does not, untick Automatic and drag the slider, or tick Invert for light artwork on a dark background.
Step 2: cleaning the mask
A thresholded scan is rarely perfect. Specks of fewer than four pixels, the dust of JPEG compression and anti-aliasing, are erased; pinholes of the same size inside the drawing are filled. Where two pixels of the drawing touch only at a corner, the tool fills one neighbouring pixel so they share an edge, because a corner contact would make the final solid non-manifold. A very noisy image, such as a photograph or a halftone print, thresholds into a confetti of tiny shapes; above 100,000 pixel edges the tool refuses it and asks for a simpler picture rather than freeze your browser. For photos, Image to Depth Map and Depth Map to STL are the right route: they turn shades of grey into heights instead of into one outline.
Step 3: tracing and simplifying the outline
The boundary between drawing and background is traced along the pixel grid itself, the lines between pixels rather than through their centres, into closed rings: outer rings counter-clockwise, holes clockwise. The bounding box of the drawing is then scaled so that its width matches the width you asked for, and every ring is simplified with the Douglas–Peucker algorithm (Douglas and Peucker, 1973). It keeps the point farthest from the straight line between two ends, recurses on each half and drops every point that lies within the tolerance, here half a pixel. A traced diagonal edge made of hundreds of tiny steps becomes one straight segment, while real corners survive.
Step 4: removing what a nozzle cannot print
A 0.4 mm nozzle lays down a line around 0.4 to 0.45 mm wide, and a wall thinner than one extrusion is not printable. So the outline is passed through a morphological opening: it is shrunk by half the minimum feature (0.4 mm by default) and grown back by the same amount. Anything narrower than the minimum feature vanishes on the way in and cannot come back; everything wider returns to its original outline. Pieces left smaller than 1 mm² are dropped. If the opening removes 1 mm² or more, you get a warning with the exact area, and you can lower Min feature or make the part wider to keep the detail.
Smooth the outline decides where the edge runs inside each pixel. An anti-aliased drawing has grey pixels along its edge and a cut-out has half-transparent ones: each says how much of the pixel belongs to the shape. With the default of 0.15 mm the outline is the contour of that soft edge, blurred by 0.15 mm, so it passes between the pixels rather than along their sides. A corner where two straight sides meet is then put back where those sides cross: on a square drawn at 0.08 mm per pixel every corner stayed within 0.01 mm of where it was drawn, also with a 2 mm border round it. Curves are left as curves. It still changes the edge in two ways: a point sharper than a right angle is blunted by about that much, and a stroke or a gap narrower than about twice the value can close. Measured on lettering drawn 40 and 60 mm wide from images of 300, 600 and 1200 pixels, every letter and every counter of bold lettering and of a logo survived up to 0.2 mm, and at 0.3 mm the counters of thin 40 mm lettering began to close, which is why the default sits below both. A drawing with no grey in it at all gains less: its staircase only goes once the smoothing reaches about two pixels. Set it to 0 and the pixel edges are traced exactly.
Step 5: triangles and a watertight solid
Each outline, holes included, is cut into triangles by ear clipping as David Eberly describes it: a polygon always has an "ear", a corner whose triangle lies entirely inside the shape, so ears are clipped one at a time until nothing is left. Holes are first joined to the outer ring by a bridge from each hole's rightmost vertex to a vertex of the outline it can see, which turns a shape with holes into one polygon that ear clipping can handle. The triangles are used for the top face, reversed for the bottom face, and joined by vertical walls along every ring. Because the caps and walls share exactly the same points, every edge belongs to exactly two triangles: the solid is watertight and manifold, which is what the STL printability checker tests for and what every slicer expects.
Silhouette or plate?
A silhouette is the shape itself, extruded to a uniform thickness: a logo you can hold, a cake topper, a stencil, a fridge magnet. It has one weakness. If the drawing is made of separate parts, the letters of a word or the pads of a paw print, they print as separate pieces, and the tool warns you. Tick Border to grow the outline by a few millimetres, which closes gaps narrower than twice the border width, or Join separate pieces with bridges to connect whatever is still apart with straight strips between the closest points.
A plate stands the drawing on a base. Choose a rectangle, a rounded rectangle (3 mm corners by default), a circle or outline, which follows the drawing grown by the margin. The default base is 2 mm and the raised drawing 1.2 mm on top of it. Separate parts are no problem here, because the base holds them all. Tick Screw holes and two holes are placed on the plate's horizontal centre line, half a margin in from the left and right edges; if they would come closer than 0.5 mm to the drawing, they are left out with a warning rather than cut into your design.
The plate is also where 3MF earns its place. STL files carry only surface geometry, with no colour, so the STL and OBJ downloads contain one merged solid. The 3MF core specification allows several objects in one file, each with a base material and a display colour, so the 3MF download keeps the base and the relief as two bodies in two colours. Load it into a multi-material printer and assign a filament to each, or print it on a single-extruder machine with a colour change at the layer where the drawing begins, the feature PrusaSlicer inserts as an M600 filament change.
Size, detail and filament
The size you set is the size of the finished part, measured on its width, its height or its longest side, whichever you choose. A border, a keyring tab or the margin of a plate are inside that figure: the drawing is scaled down to leave room for them. The summary gives the final size, the triangle count and an estimate of the filament: the volume of the solid multiplied by the density of PLA, 1.24 g/cm³, the same value the slicer's PLA profile uses. For a proper price including electricity and machine time, take the grams to the 3D print cost calculator, or slice the model and read the time and weight from the online STL slicer.
Related tools on this site
Two presets of this same engine have their own pages. The Keychain maker adds a keyring tab with a real through-hole and a border that holds everything together. The Cookie cutter generator turns the outline into a thin cutting wall with a stiffening flange. Both explain the geometry specific to their job.
When not to use it
This tool makes 2.5D parts: every point of the drawing has the same height. It cannot read shading as depth, so a portrait photo will not become a face. Use the depth-map tools for that. It does not import vector files; export your SVG or PDF logo to a PNG first. And it is not a CAD program: for parts that must fit other parts to a tenth of a millimetre, model them properly and use this tool for the decorative pieces.