Create a Vector Outline With a Photo and Inkscape
If you work with digital photos or images, you've probably noticed that if you resize them to be larger, they lose resolution and either become pixelated or blurry. This degradation affects raster images, a category of image files such as JPEG, BMP, GIF, or PNG, all of which are based on pixels. If you convert that image into a vector image, however, it can be enlarged to a billboard and will still look as sharp as the original. This tutorial shows you how to use Inkscape to create a vector outline from any digital image.
Steps
- Open Inkscape.
- Open your image in Inkscape. This one was found in a search for Creative Commons images. Until you have some experience creating vector images, it is good to learn the process with a simpler image.
- Choose the size for the vector image.
- Click on File > Document Properties. Alternatively, press CTRL + SHIFT + D
- Choose the size that you want the vector image to be. You can select from a list of standard page sizes or type in a custom width and height. This article will use 300x300. You do not have to hit Enter; just close the dialog box.
- Resize your photograph or raster image. Click the Select and transform tool in the column of tool icons on the left side of the workspace, or press F1. Click on your raster image until outward-pointing arrows appear at its corners. If you see rotational arrows, click in the middle of your raster image again. Click on one of the outward-pointing corner arrows and hold CTRL while moving the mouse diagonally to resize your raster image to the size of the vector image. Holding CTRL maintains the aspect ratio of the selected object.
- Click on the Pencil (freehand) tool icon, or press F6.
- Zoom in on the raster image. Hold down CTRL while moving the scroll wheel on your mouse, or click on the Zoom tool icon:
- Start tracing using the Pencil tool. The traced paths should be somewhat similar to the shape, but they don't have to be exact. You will make adjustments later.
- Once complete, click on the Edit paths by nodes tool icon, or press F2: Zoom in on the path you drew, and start editing. You will see many squares. Those are nodes that define the path. You won't need nearly as many as are there, so it's helpful to eliminate some of them. There are two ways to do this:
- Select a section to edit and hit CTRL L to Simplify the path. This is an easy way to eliminate excess nodes. Unless you are doing some really fine work, this method should be sufficient enough for you. You can use the Simplify command multiple times on the same selected nodes.
- Select a section to edit. Click on nodes (squares), and delete them by hitting the Delete key after each selection.
- Zoom in on your image to see where the paths need adjustment. As you can see, this one will need some tightening up. It was created using a trackball, so precision work was difficult.
- Start adjusting. In this intentionally messed up image, the node is clearly visible. Moving the square will move its location, and moving the two circular extensions off of it will adjust its Bezier curve segments. You will have to experiment and read the Inkscape manual to get the hang of it.
- To get the basic shape of your image, move the nodes (squares) to the correct places before doing further adjustments. You will find yourself adjusting the curves, but moving the nodes first makes it easier.
- You can click on a segment connecting two nodes and adjust the line.
- Periodically zoom out to check your progress. Be aware that you can zoom in too close. Some parts of your image may require you to be very close, but others might need your perspective to be a little further out.
- Remove your raster image from the screen so you can check for gaps in your traced paths.
- Click on the Select and transform tool icon, or press F1:
- Click on the photo and move it over to the side. You will probably want to keep it nearby for future reference.
- Assemble all the various parts of the image. Click on the Select and transform tool icon: Select the entire image, and 'unionize' it.
- Click on Path > Union.
- Hold down CTRL and ++ simultaneously.
- Choose the color that you want your image to be. Select it (or it may still be selected) and then choose the color at the bottom of the screen and click on it.
- Find the Paint Bucket Icon and click on it. You won't be actually painting your image yet, but finding out where any gaps or holes are.
- If it won't fill, it isn't 'bounded' and it needs more work on the nodes.
- Zoom in even closer to see where more work needs done.
- Continue until you have your basic outline. This image is a traced vector outline from the flower above.
- Resize the image. Go into Document Properties to resize the image .
- See how vectors work. This image has been tripled in size with no loss of resolution or pixels.
- Note the gaps between the colors of the image and the outline. You may have to use another program to get your finer adjustments.
Tips
- If you are good at using a photo editor, start with your image - using desaturation and maximization of the contrast, you will get a strong outline of your image (http://imgur.com/szawt.png). Save it, import it into Inkscape, then choose menu Path > Trace Image. Select Edge Detection, press Update; you should see the desired outline of your image. If it looks reasonable, press OK, wait until Stop is not active anymore, close this window. You should have the outline overlaid over the original image.
Related Articles
- Understand Vector Graphics
- Resolve a Vector Into Components
- Vectorize an Image Using Vector Magic
- Draw a Hackergotchi with Inkscape
- Create a Stamp Effect With Inkscape
- Make Semi Transparent Flowers in Paint Shop Pro