Logo Sivuelementti Sivuelementti

Vector graphics on The GIMP

Possibly one of the most practical tools of the GIMP is the Path -tool. It allows you to easily create complex selections, smooth curves and scalable graphics (vector graphics).

A word about vector graphics for those, who don't know what it means. There are two kinds of graphics: raster graphics and vector graphics.

Raster graphics is the most common form of graphics.
It is saved in pixels, one by one, from which are saved their colour, transparency etc. Raster graphics is sharp and multicoloured, but problems occur when you try to scale it bigger. The only way to make a raster graphics image bigger is to make its pixels bigger, which leads to disortion. The image becomes pixelized.

Vector graphics is saved mathematically in curves and lines, that are called paths. The shape of the paths is created by anchors, that affect the shape of the path in different ways. When a vector graphic image is saved, computer saves the anchors and their settings. When you scale vector graphics bigger, computer calculates the new size of the path mathematically in correct relation to other paths. This way no disortion will occur and you can scale it again and again without any problems. Because the computer doesn't have to save every single pixel of the image separately, vector graphics don't require so much free disk space. On the other hand, you can't create as accurate images as with raster graphics. Simple images, like logos, should be saved in vector graphics, because you often need them in various sizes. You can rasterize it afterwards, of course.

I hope you now got the idea of vector graphics, so that we can find out how you can use it in The GIMP.

Using vector graphics in The GIMP.

Creating paths is done by using the path tool. Once you've selected it, you can create paths in the image window by clicking anchors into the image. Anchors are the fixed points of the paths. By clicking on the image once, you'll get an anchor, which makes a corner into the path. If you click and drag, you'll get an anchor which makes the path bend. An anchor like this has two lines attached to it, in the end of which, a small square. You can move these squares, and so adjust the shape of the path. The longer you make the line, the more it affects the shape of the path. You can also drag the path between two anchors.
If you want to create a closed path, hold down CTRL -key and click the first anchor after you've placed the last anchor. A path now connects the first anchor and the last anchor.

Creating path

Stroking path is the best way to create curves in The GIMP. It's done by selecting a path in the paths dialog and clicking 'Stroke path' button in the lower corner of the dialog. You can choose the thickness, colour, the style of the caps and joins, dash pattern, antialiasing or just the tool you want to stroke the path with. This means that you can aditionally smudge, erase or burn along the path, for instance.
You can also create a selection from a path. This is done by selecting
Select - From path

Stroking path

Manipulating paths

Now we're getting to the best part, the manipulation of paths. You can use the tools listed above (move, rotate, scale, skew, perspective and flip) to paths too. And the quality of the image won't decrease at all! To use these tools to paths, you have to set the Affect into Paths.

When you edit paths, you should have a plain, one-colour layer in the document, to make the path show better. Differentiating the path on alpha is very difficult.

Using perspective tool to paths.

If you use the perspective tool to a raster layer, it may become disorted. If you use it to paths, computer calculates new values to the anchors and the quality won't decrease.

Saving and loading paths is obviously very useful. If you want to save a simple stroke image, you should save it in paths. This way it takes less space and you can scale it later on without worrying about disortion or lost information.
Paths are saved by selecting a path in the paths dialog, right cliking it and selecting Export path. In the opening window you can choose where and with which name you want to save the path.

PPaths can be opened the same way as any image file. In the main window
File -> Open...

When you've selected the file and opened it, a window appears asking how you want the path to be opened. You can choose the size freely, no fear of disortion.

What do you think? Let me know! (Tutorials are rated as 10 being the best)


Back to the tutorials | Back to the index.

Any feedback will be received with pleasure. Share your thoughts here.
© Peltzi. All rights reserved.

Sivuelementti Peltzi
Suomi English