Selection guide

From OSP Wiki

Jump to: navigation, search

This tutorial was last tested for the Gimp 2.2.13

Contents

Overview

This tutorial is about one of the most basic tasks of the GIMP, selecting areas.

Prerequisites

None

Selection tools

Like similar programs of its ilk The GIMP has several ways that you can use to select areas of the image. This section explains the different tools available in The GIMP. The next section will describe the different methods you can use the tools to alter the area selected.

The area selected is indicated by a dashed outline called the "marching ants".


Square

The first selection tool is the square. Pretty simple, you click on the image and the drag the mouse across it until you have selected the area that you desire.
One of the things you cannot do in the 2.2 series of The GIMP is alter the selected area size. You can add or subtract to the selected area (see the next section) but you can't just grab one side of the area and move it.

Image:01-square.jpg

Circle

The next tool is the circle. Same principle as the square, click and drag to select the area that you want.

Image:02-circle.jpg


Free Select

This selection tool is handy but hard to use, you trace an outline on the image by clicking and dragging your mouse across the image. As you do GIMP will draw the selection line, when you release the mouse button GIMP will snap a straight line between where you released and where you started, completing the selection area.
Here is my really lame attempt at drawing a dog as a selection area.

Image:03-hand.jpg

Magic wand selection

This tool needs an explanation on how it works. You do not click and drag to select with it. When you click on the image GIMP reads the value of the pixel you clicked on, it then uses the threshold value you set. It will select a continuous area to plus and minus of half the threshold.

As an example, you select a threshold of 16, you then click on a pixel that has a value of 100. GIMP will select all of the connected pixels that have a value between 92 (100-8) and 108 (100+8).

In the image below I set a threshold of 16 and clicked on the pixel at the end of the red arrow. Notice how the selected area goes towards the black and towards the white by an even amount. To increase the area selected you increase the value of the threshold.

Image:04-fuzzy.jpg

Colour

This is similar to the Magic wand selection tool, you set a threshold and you click on a pixel. The difference is that when you use this tool it selects ALL of the pixels in the threshold range no matter where they are within the image. With the Magic wand tool only connected pixels in the range are selected, with the Colour tool they do not have to be connected.

Notice in this image that it has the two selected areas, the one at the bottom where I clicked and the one at the top that matches the same range as the top.

Image:05-colour.jpg




Selection modes

Once you know the basics of the tools you can start to use them in different ways to alter the selected area. In most of these examples I have started with a square selected area and then drawn the same circle area using the different modes.

Any of the selection tools can be used in combination with each other. It does not matter which tool was previously used.


Replacement

I forgot to take a screen shot of the default selection method. In this mode when you select an area GIMP forgets about the area previously selected and just does the new area. Be careful though, if you have an area selected, a selection tool activated then you click and drag from within the currently selected area you will end up moving the current selection to a different part of the image.

To avoid that you can just click once anywhere outside the current selection. This will clear the current selection and you can start again.

Additive

As the title suggests when this method is used the two selected areas are added together.

Image:06-addative.jpg

Subtractive

Basically the opposite of the additive, the area selected is taken away from the currently selected area.

Image:07-subtractive.jpg

Intersecting

The resulting area selected using this method is where the selected area overlaps the currently selected area.

Image:08-intersect.jpg

Keyboard shortcuts

There are keyboard shortcuts for the additive and subtractive modes. If you hold the Shift it will add the new selected area to the current. If you hold the Ctrl it will subtract from the currently selected area. Your mouse pointer will indicate with a little plus or minus sign (you can work out which goes with which mode). The problem you will encounter with using these shortcuts is that these keys also alter the behaviour of shape selection tools.

When you hold the Shift key while using the Square or Circle selection tool it will draw a perfect 1:1 ratio square/circle as well as adding to the selection area. If you hold the Ctrl key it will draw a rectangle/ellipse but the centre will be where you first clicked and expand an even amount to either side as you drag the mouse.

Using the Shift key is especially handy when using the Magic Wand and Colour selection tools. If you set the threshold too high you end up selecting areas that you did not really intend to. A much easier method is to set the threshold to a lower value, then you just hold down the Shift key as you click on the image to keep adding to the selected area.




Selection sizes and ratios

The square and circle selection tools have three size options.

Free select

Quite simply this allows you to click and release the selection area to any size and aspect ratio. The default behaviour is the first click is in one corner and where you release is in the other corner. Even with in this mode you can alter the behaviour with the Shift and Ctrl key's. As explained in the section above the Shift forces a 1:1 ratio and the Ctrl will set the first click to be the centre of the shape.

Image:09-size-aspect-3.jpg

Fixed aspect ratio

This allows you to specify a height to width ratio. As you click and drag GIMP will draw the selected area in the ratio specified. So you could select a ratio like the screen shot and then click and drag straight across the photo. GIMP will expand the selection area downwards at the ratio specified until you release the mouse button.

This feature is used in the Crop to a ratio tutorial.

Image:09-size-aspect-2.jpg


Fixed size

This allows you to specify the exact size that you want selected. Put in the numbers and then click and drag in the direction that you want the area selected.

Image:09-size-aspect-1.jpg


This tutorial is not finished

This subject is HUGE and I keep finding things that should also be explained. Still to on the list:

  • Feather edges,
  • Quick masks,
  • Real world example photos. I plan on showing sky selection using the Magic wand.
Personal tools