How to convert a bitmap into an embroiderable file with free tools.

Find an image you'd like to work with. Here's an Imperial Penguin from submitter SoUnique:

Open it in gimp, select Image -> Mode -> indexed, select "Generate optimum palette", and try different small values for "Maximum number of colors". More colors means more fine detail and more thread changes; so start as simple as you can while making an interesting image. Here's our image brought down to 5 colors:

Bring up inkscape, and paste the indexed raster image in. Select it, and click Path -> Trace Bitmap.

In the Mode tab, in the Multiple Scans group, select "Colors", set Scans to the number of colors you used when making the image indexed in Gimp. Unselect "stack scans", so that the colors end up non-overlapping. Select "remove background" to eliminate the rectangular border. Click OK, and you've got a vector version of your image:

Here are the vector layers, separated:

(Past this point, I did some cheating not recorded here: I colored the white parts of the image red in Gimp, so that "remove background" would eliminate the border, while still generating a layer for the white foreground elements. Then, in inkscape, I recolored the red traced layer white.)

Spread the layers out. I've turned the white layer olive so I can see it; obviously, the finished color will be whatever thread I put in the embroidery machine. :v)

At this point, you'll need to have my half-baked embroidery extension installed.

For each layer, select the layer path, invoke Path -> Break Apart, then invoke Object -> Group. Then invoke Extensions -> Embroider to generate stitching paths. As you generate each path, copy off the embroider-output.exp file into a file named for the color layer.

It's not quite this easy, since my embroidery code (and the comptuational geometry library it calls) isn't as robust as I'd like it to be. I had to hand-tune the geometry a bit to make it simple enough to pass through the embroider script without exploding. Helpful tips:

Ultimately, you want to convert all the paths in one step, to ensure that all the colors end up in a single file, with a common origin, so you don't have to align them at embroidery time.

Convert the .exp file to your machine's format using TrueSizer.