Tutorial: How to Make Colour Vector Illustrations from Line Drawings using GIMP and Inkscape
It's my sister's birthday today, and for her present I wanted to make her a portrait, based on a quick sketch I did on the tram last time we hung out. I also wanted to learn more about using Inkscape, which can seem like a somewhat esoteric art. So here's what I learned about sexing up your line drawings using only open source graphics tools. Please tell me if there is a more efficient alternative to any of the steps below!
Stage 1: Prepare the Drawing
First, we digitize the drawing and clean it up using GIMP.
- Scan or photograph your line drawing, and open it in GIMP.
- Convert to greyscale using Colours > Desaturate. Now get rid of as many shades of grey as possible by turning up the brightness & contrast (Colors > Brightness-Contrast). You're aiming for more-or-less black lines on a white background.
- Open a toolbox (Ctrl + B), and double click on the 'Select by Color' icon to get up the tool options. Notice the 'Threshold' slider.
- Now click on the white area you want to get rid of, to select it. The higher the Threshold, the more cruft will be selected.
- In the main menu, go Select > Invert. Now only the line drawing itself is selected.
- Copy and paste this selection into a new image (Ctrl + C, then Shift + Ctrl + V). Export it as a bitmap file such as .png (File > Export).
Stage 2: Create an Inkscape Image
- Open up Inkscape, and open the Layers dialogue (Shift + Ctrl + L). Create a new layer with the '+' button. Now, paste your .png drawing onto that layer.
- Now, decide how to deal with your line drawing. There seem to be 3 options:
- Convert the line drawing to a Path, creating a 100% vector image (Path > Trace Bitmap). With anything more complex than a very simple line drawing, this doesn't seem to work very well.
- Manually re-create your drawing by tracing vector lines over it (e.g. using the 'Draw freehand lines' tool), then delete the bitmap original.
- The lazy option: keep your drawing as a bitmap. It will appear pixellated compared to the vector layers you're about to add, but lets you retain the subtle marks made by pencil/pen and saves a lot of time.
Stage 3: The Fun Bit
Now it's time for colouring-in!
- Get up the Layers dialogue again (Shift + Ctrl + L). Create a new layer with the '+' button, positioning it below the layer with your drawing on, using the down arrow button.
- Now, you can add blocks of colour that will show through beneath your line drawing. In the image below I use the 'Draw freehand lines' tool to draw a shape corresponding to the face.
- Each shape has a 'Stroke' (ie outline), and 'Fill' (ie block colour). Once you've drawn the shape, select it and click Shift + Ctrl + F to get up the Stroke & Fill dialogue. In the Stroke Paint tab, click the 'X' button to get rid of the outline. In the 'Fill' tab, click the solid square button ('Flat Color') to give it a fill colour. Now you can use the various sliders to pick a colour you like.
- For subtle shadows, you can slide up the 'Blur' slider in the Fill & Stroke dialogue. You might also want to reduce the Opacity using the slider just below it. Here, I draw a cheekbone shape with the freehand tool, then turn up the blur and turn down the opacity.
Stage 4: Adding a Photographic Background
Astute readers will have noticed Ciderpunx looking out the window in the background of the image. I wanted to add some Rotterdam scenery for him to be looking at. Here's how I did it:
- Copy and paste your photo into Inkscape.
- Use the 'Draw Freehand Lines' tool to draw the 'window' you want the photo to appear through.
- Now use the Select tool to position the photo in the right place. With the photo selected, select the shape you've just drawn as well (Shift + click on the shape). Both of them should now show the dotted outline and arrow handles.
- In the main menu go Object > Clip > Set. The photo will now be cropped to the shape you drew.
Stage 5: Export!
Your image is transparent at this stage. If you want a background colour (Eg white), add it now by making a new bottom layer and creating a large white shape on it. Now go File > Export Bitmap and choose how big you want the finished image to be. And voila - happy birthday Louisa!