How to Trace in GIMP
By Kevin Lee
GIMP’s Lasso tool can help you select an object in an image by dragging your cursor around the object. After you do that, you have the ability to change the way the selection looks by recoloring it, applying filters or performing a variety of other tasks. While the Lasso tool works, the Paths tool can produce more precise results when you need to trace complex objects. This tool enables you to trace a path around an object by placing small dots along its perimeter.
Trace a Path
Launch GIMP and open an image that contains an object you'd like to trace.
Press "Ctrl-B" to view the Toolbox window if it's not visible, and click the window's "Paths" tool to select it. The Paths tool looks like a blue pen with a yellow tip that sits to the right of a white bar. That bar contains three boxes stacked vertically. A white curve extends from the top of that bar to the brush's tip. GIMP displays the tool's name when you move your mouse cursor over the right icon.
Click a point along the edge of the object you wish to trace. For example, if you want to trace a building, click a point along the building's edge. When you do that, GIMP places a small dot at that point. Move your cursor a short distance along the edge and click a new point. GIMP places a dot at that location and draws a short line segment between that dot and the previous one.
Continue moving your cursor short distances along the object's edge and clicking points to draw short line segments. Eventually, you will draw a path around the whole object. When you reach your starting point (the location where you created the first dot), double-click the dot to complete the path. This path will consist of all of the small line segments you created by placing dots along the path.
Use a Path
Click "Windows," select "Dockable Dialogs" and click "Paths" to open the Paths dialog window. This window has an icon that represents the path you traced. By default, its name is "Unnamed." If you had multiple paths, you would see them in this window.
Review the buttons at the bottom of the window. Click the "Path to Selection" button if you'd like to convert the path into a selection.
Find the window's "Paint Along the Path" button. This button enables you to generate a line around your object automatically using the path you traced.
Click the “Paint Along the Path” button, and type a value in the "Line Width" text box. That value determines the line's width in pixels. Click "Stroke" to draw a line around the object. The line's color matches the project's current foreground color.
After you create a selection from a path or draw a line around an object, you can delete the path by selecting it in the Paths dialog window and clicking "Delete." You can then enhance the selection any way you like.
When you trace a path around an object, you can click and drag any dot along that path to adjust the line segment at that location. You'll probably need to do this since it's difficult to trace around an object perfectly. For instance, if you see that one line segment has space between it and the object’s edge, you can click and drag the two circles at either end of the segment and move them to bring the segment closer to the object's edge. Your goal when tracing is to make your outline fit flush against an object’s edge.
If you want to trace a small object, do that more accurately by clicking the drop-down box at the bottom of the image window and selecting a zoom percentage. Select "400%," for instance, and GIMP makes the image four times larger.
After majoring in physics, Kevin Lee began writing professionally in 1989 when, as a software developer, he also created technical articles for the Johnson Space Center. Today this urban Texas cowboy continues to crank out high-quality software as well as non-technical articles covering a multitude of diverse topics ranging from gaming to current affairs.