Illustration

How to Turn a Sketch or Drawing into a Vector

5 min read

To vectorize a sketch, scan or photograph the page and convert the picture to SVG: the drawing comes back as shapes you can resize and recolour. How those shapes look depends on one setting, Image type, and if you want the lines alone on a colour, on a second one, Geometry.

A pencil drawing of a surprised girl's face, the same face drawn as fine vector paths, then the finished SVG with the lines in solid black

Our example is a character sheet in pencil. A girl in a baggy jacket and rolled-up cargo trousers stands with a fox on her shoulder, and beside her are two studies of her head, one laughing and one surprised. Sheets like this end up as stickers, prints and the first pages of comics, and this one has what most of them have: light hatching next to firm outlines, hair drawn with dozens of loose strokes, grey tone in the folds.

Keep the pencil or ink it

With the settings left alone, Image type is Regular image, and the SVG keeps the pencil. Strokes and shading come back as flat grey shapes, about fifty shades of them plus 78 soft gradients, in 3,077 shapes and 1.4 MB. At print size it reads as the pencil sheet. Zoom in on the laughing head and the shading turns into patches of grey with clean edges.

Drawing, the other choice under Image type (it is among the conversion settings from Lite up), inks the page instead. The light hatching on the jacket and the fox's fur become black lines, the outlines go solid, and no grey is left apart from thin slivers along a few edges. Where the pencil was dark the ink fills in: the bag strap, the shirt under the jacket and the inside of the hoods turn solid black. The sheet comes out heavier than it was drawn, much as if someone had gone over it with a brush pen. 3,246 shapes, 1.2 MB.

So the choice follows where the character is going. A print that should still look like pencil wants Regular image. A sticker, a one-colour T-shirt or line art to colour in wants Drawing.

The sheet and both conversions, nothing retouched. Regular image keeps the pencil as greys; Drawing turns every line black, and the dark tone on the strap and under the jacket fills in.

What a brightness cut-off leaves out

The usual way to get black lines out of a pencil drawing is a threshold: everything darker than a chosen grey becomes black, the rest becomes white. potrace works like that, and so does Inkscape's Trace Bitmap in its brightness mode. We ran potrace on the same sheet at the middle setting.

The fox's ears, the girl's chin and the buckle on the strap came through. Whatever was drawn lighter than the cut-off did not: most of the hair, the fox's fur and nearly all of its tail, the folds of the jacket. The girl looks as if her head had been shaved. Drawing kept those light strokes as lines.

The fox and the head up close. potrace keeps only what is darker than its threshold, so the light hair, the fur and the tail drop out; Drawing keeps them as lines.

Putting her on a colour

Next we wanted the inked girl on blue, the way she would sit on a coloured shirt or a poster. Opened in an editor, the Drawing file has three layers: one white rectangle at the back for the paper, the black ink on it, and on top of the ink 2,301 white shapes, one for every area the lines close off.

Deleting the paper rectangle alone gets you most of the way. The face, the jacket and the trousers stay white on blue. The hoods on the two heads and part of the fox's fur went blue as well, because their lines never close, and the white inside them was the paper itself.

Our next try was worse. We selected every white shape at once and deleted them, and the girl turned into a black silhouette: the ink underneath is solid, without a single hole, and the white on top had been drawing her face.

For the lines alone, we converted the sheet a second time with Geometry on Flat, which sits in the same settings panel. In a flat file the ink has real holes where the paper showed through, so deleting all the white leaves only the lines, with the blue between them. That is the file to colour in underneath, or to print in one ink on fabric. Flat keeps every edge twice, once round the hole and once round the white piece, so the converted file is heavier: 64,101 anchor points against 31,973, 2.3 MB against 1.2. With the white gone it is back to 1.2 MB.

The Drawing file on blue. Left: only the paper deleted, and the open hoods go blue with it. Middle: all white deleted from the usual file, a silhouette. Right: all white deleted from the Flat file, the lines alone.

Your own page

We converted the sheet at its own size, 1024 pixels square. Drawing works on pictures up to about 2.5 megapixels, and a larger one converts as a regular image even when Drawing is picked. Any PNG, JPEG, WebP or BMP up to 50 MB uploads.

The demo on the home page converts your sketch without an account and shows the result as a picture; if the page looks like line art, it asks whether to treat it as a drawing. The SVG comes with a subscription from Lite. Download it from the workspace queue or from your dashboard within 24 hours, unless you chose a longer storage time.

Stray marks on the page come through as shapes of their own, each one something you can click and delete. Look over the faces and hands up close before a file goes to print.

Related guides