Silver Seams

Converting to vector

Thu, 05 Aug 2021

At least once a week, someone turns up in an Ink/Stitch support venue puzzled because they loaded their picture into Inkscape, tried to export it as a stitch file, and it didnā€™t work. Turns out there are a few intermediate steps. If youā€™re starting with a bitmap (a GIF, JP[e]G, PNG, etc.), you wonā€™t get any results at all ā€“ the first step is converting the bitmap to a vector.

There are two types of images. A bitmap is a grid of square dots. The embroidery machine has no idea what to do with it: at heart, it draws lines. Thatā€™s what vectors are. Itā€™s pretty easy for your computer to turn a set of vector instructions into a bitmap (ā€œdraw this line along the grid, and color any square dots we pass overā€ and so forth), but harder to go the other way. Iā€™ll need to hold its hand a little.

Weā€™ve chosen a suitable bitmap. Iā€™m going to copy the bitmap from Emojipedia into Inkscape. Itā€™s only a 240Ɨ240 image; the larger the better, but for something this simple this should do. (I can go to the Twemoji repository and download the vector version, but for the sake of the tutorial Iā€™m going to pretend I canā€™t.)

Face with Tears of Joy on Twitter Twemoji 13.1

I pasted the image into Inkscape, then selected Path > Trace Bitmap. There are a lot of options in that box. Iā€™m going to switch it to colors, and the minimum number of scans that will get all the colors. If I let it use more, it will try to shade areas where the two colors meet, and I donā€™t want that.

As I said, the computer has trouble guessing at the original shape. Corners especially give it trouble. This is actually not terrible for embroidery purposes, and itā€™s often what youā€™re going to get if you buy cheap embroidery designs from a mass-producer.

Next is a little cleanup with Ink/Stitchā€™s tools: after an Inkscape Ungroup, I let Ink/Stitch Troubleshoot > Clean Up Document and also Fill Tools > Break Apart Objects because the Trace leaves a few scraps, and also makes every color a single object. Ink/Stitch wants every object to be a single fillable space, so for instance the upper and lower parts of the yellow face need to be separated.

At this point, we have an embroiderable file. It doesnā€™t even look too bad in a preview: here it is at 2.5ā€³ wide:

Thatā€™s pretty good, at least on the screen. You can node-edit the shape now to make it more precise, or wait and see if you really need to.

Letā€™s stitch that out and see what happens.

Toss a coin to your stitcher! (Ko-Fi)


Patreon logo

Join my Patreon for monthly rewards!

Coffee logo

Was my site helpful? Buy me a Ko-Fi!