Data generator for (multicolor) 3D printing from images

Would you like to 3D print a picture, a logo, a fairy-tale character or a child's drawing? Or make an original fridge magnet? I created the Image Vectorizer app for exactly this. It turns an ordinary image into a multicolor SVG, 3MF and STL. Each color is separate, and everything runs only in your browser – the image is never uploaded anywhere.

What do you need? First of all, a 3D printer. A filament changer such as AMS or similar is also helpful, but colors can be changed manually too – it's just a bit more work. Most importantly, you need a source image, for example one downloaded from the internet. The larger the image, the better, of course. But the app copes well even with fairly small images thanks to smart upscaling. If the image still isn't perfect, you can easily edit it right in the app. You'll get great results even from hand-drawn pictures, including single-color ones – white areas can be colored directly in the app as well. The objects need a contrasting outline so the app can tell where each color ends. Missing or broken outlines can be drawn in or fixed, too. A drawing on paper can simply be photographed with a mobile phone (make sure there's enough light, without shadows or glare), or ideally scanned on a flatbed scanner.


1. Loading an image

  • Switch the interface language with the CZ / EN buttons in the top right corner.
  • Drag the image anywhere into the window, or click Choose image.
  • Sample files opens a folder with example images.
  • Crop: drag a selection with the mouse in the preview; it can be moved and resized by its corners and edges.
    • Automatic finds the empty margins and selects only the image content.
    • Confirm the crop with the Crop button, or cancel it with Cancel.
  • Background… offers two options:
    • Clean background to white turns a near-white or single-color surrounding into pure white.
    • Remove background (transparent) removes the surrounding, so only the motif is printed.

2. Size
In the Size (800 DPI) section, enter the width or height in millimeters. When the lock is on, the other dimension is calculated from the aspect ratio.


3. Print suitability
The panel rates the image for the set size:

  • Green: Suitable for 3D printing
  • Orange: Suitable after adjustment
  • Red: Not suitable without changes

The reasons are listed below the rating: original resolution in DPI, blurred edges, noise, JPG artifacts, specks, thin lines and the number of colors.
Buttons in the panel:

  • Prepare SVG prepares everything in one click:
    1. optimizes the image if its resolution is low,
    2. sets the recommended noise and line removal,
    3. turns on Edit image with black outlines,
    4. sets area removal to 0.5 mm²,
    5. starts processing.
  • AI image upscale enlarges the image using artificial intelligence in a new window.
    • Modes: Drawing 4×, Drawing 2× or Photo 4×.
    • The result automatically returns to the app and replaces the original image.
    • If the browser blocks the new window, allow pop-ups for the page.
  • Optimize enlarges the image directly in the app:
    • Cartoon / graphics: sharp edges, main colors only.
    • Photo / gradients: smooth enlargement that keeps gradients.
  • Shrink to … mm sets the size at which the original has 250 DPI.
  • Apply recommendation sets the recommended noise and line removal.

Image diagnosis shows the resolution, edge sharpness, noise, JPG artifacts and significant colors. It also includes the recommended maximum size.


4. Raster preview

  • Original shows the loaded image, optimized or cropped if applicable.
  • Raster shows the edited image that is converted to SVG exactly as displayed.
  • Edit image turns on editing of the image with the main colors.
  • Save image saves the edited image as a PNG, which is useful if you want to generate the SVG again later.
  • Reset returns all image edits to their default state.

Edit settings:

  • Selection tolerance works like a magic wand: it sets how much a pixel's color may differ to still belong to the same area.
  • Sharpening sharpens blurred edges before areas are selected.
  • Black outlines: thin dark lines are drawn with the darkest color and do not blend into their surroundings.
  • Brightness and contrast, with the Brightness and Contrast sliders, changes only the image. The colors and their number stay the same; only the areas assigned to them change. Auto sets the values automatically.

Main colors are suggested right after the image is loaded and are sorted from darkest to lightest.

  • Click a color to select it.
  • The cross removes a color, and you choose the color that replaces it.

Tools:

  • Fill with color: click an area to fill it with the selected color.
  • Find color: click the image and the color gets selected in the swatches. Shift + click works the same way.
  • Add color: pick a color in the RGB picker, or click the original image. The number of colors increases.
  • Drawing: paints with the selected color. Set the brush width with the slider. While drawing, Shift + click picks the color under the cursor.
  • Reset restores the suggested colors.
  • Undo reverts the last edit.

5. SVG generation

  • Noise / JPG removes grain and compression artifacts.
  • Colors is at most the number of colors in the image editing swatches.
  • Remove up to removes thin lines up to the set width in mm.
  • Remove areas up to removes connected areas smaller than the set value in mm².
  • Min. stroke width: set it according to the nozzle diameter, e.g. 0.42 mm. Narrower places are widened.
  • Advanced contains:
    • Skip insignificant colors
    • Edge sensitivity

6. Processing

  • Process starts the conversion. The thermometers show the progress.
  • Image editor – my simple image editor for more demanding edits, if the converter's tools are not enough.
  • Print changes highlights in red the places that were changed for printing. The button appears above the raster preview after processing:
    • widened thin lines,
    • removed small areas and specks,
    • rounded corners.

7. SVG preview

Smoothness sets how much the outlines are smoothed.
Click an area to remove it; the neighboring color replaces it. Undo restores the removed area.
In the Colors list, you can hide a color in the preview, or remove it with the minus button.

8. Export

  • Export SVG saves a single SVG file in millimeters, with each color in its own layer.
  • Export STL (ZIP) saves a separate STL for each color – a simpler alternative to the Convert to STL button below.
  • Convert to STL passes the SVG output to the SVG to STL app in a new window. There you will have further editing options.

Loading an SVG
Drag the SVG file anywhere into the app window, or click Open SVG…. The Sample button loads an example image. An SVG can also be passed directly from the Image to STL app with one click (see the previous section). The colors from the SVG are preserved.
Preview controls
Rotate the model with the left mouse button, zoom with the wheel and pan with the right button. The Top button shows the top view, the 3D button an angled view.
Object height (Z axis)
Sets the extrusion height of all areas; the default is 0.6 mm. The range is 0.1–300 mm. Enter the value with the slider or as a number.
Size X / Y (aspect kept)
Width X and Length Y are read from the SVG. When you change one value, the other is recalculated to keep the aspect ratio.

  • Convert outlines (stroke) too converts the lines from the SVG to 3D as well, not only the filled areas.
  • Curve smoothness sets how finely rounded shapes are divided into line segments.

Base under the object
Creates a plate under the whole model that exactly follows its outer outline. The default height is 2 mm; a value of 0 turns the base off. The parts are placed on top of the base.

  • Close inner gaps narrower than closes inner gaps in the base that are narrower than the set value. The default is 0.2 mm.
  • Fill inner holes fills all inner holes in the base.
  • Base colour: Auto picks the most common color along the outline. Click a color to set it manually.

Remove parts

  • Select: click to select a part, hold Shift to select several parts. Selected parts turn red and the Delete key removes them.
  • Eraser: click a part to remove it immediately.
  • Delete selected removes the selected parts.
  • Select all selects all parts.
  • Invert inverts the selection.
  • Undo, or Ctrl+Z, reverts the last removal.
  • Restore all brings back all removed parts.

Colours
A list of all colors in the model with the number of parts. You can enter a custom height for each color. An empty field means the default height.

  • Select selects all parts of that color.
  • ✕ removes all parts of that color.

Display
Gloss and Background change only the look of the preview and do not affect the export.
Export

  • Download 3MF for Bambu Studio saves one object with a part for each color. Bambu Studio and OrcaSlicer take over the colors; you just assign the filaments.
  • STL per colour (ZIP) saves a separate STL file for each color and for the base. The files share the same coordinates and are intended for PrusaSlicer and other slicers.

The exported models are closed (manifold).


I hope you have lots of fun using this app. I really enjoyed developing it, so I hope it will be useful to others – not just 3D printing enthusiasts.

Luboš Hort