Online Documentation Server
 ПОИСК
ods.com.ua Web
 КАТЕГОРИИ
Home
Programming
Net technology
Unixes
Security
RFC, HOWTO
Web technology
Data bases
Other docs

 


 ПОДПИСКА

 О КОПИРАЙТАХ
Вся предоставленная на этом сервере информация собрана нами из разных источников. Если Вам кажется, что публикация каких-то документов нарушает чьи-либо авторские права, сообщите нам об этом.




[Top] [Prev] [Next] [Bottom]



Selection tools


In this chapter, we'll learn about making selections, and how to use the different selection tools. We'll also discuss why strange things happen when you try to move your selection for the first time.

The Basic controls

The first six tools in the toolbox are selection tools. In order to manipulate a specific part of your image, you first need to select that area. The trick is to find the right selection tool, or the right combination of tools, to make your selection correspond as exact as possible to the object you want to work with. A sloppy selection is quickly discerned by the eye, and your work will not look very convincing. The selection tools in the toolbox are used for quick, simple selection. For really advanced selection work, read the chapter "Channels" and "Select Menu".

When you have made a selection, the boundary of the selection appears with a blinking dotted outline, sometimes referred to as "marching ants". Your selection is now the only active part of your image; the rest is masked and is not affected by your operations. (If you find the blinking line distracting, the GIMP allows you to swich it on and off with "toggle" in the Edit/Select menu.

If you're not happy with your selection, just make a new one; the first will instantly disappear and be replaced by your new selection. If you regret making selections at all, just click once in your image, (with the rectangular, ellipse or lasso tool active) and the selection will be gone. However, you might want to make more than one selection, or combine several selections into one - then you'll have to use the "Shift" and Ctrl" keys.

Pressing the Shift key as you drag your selection allows you to make more than one selection. If the selections touch, they will be welded into one single selection (union).

Pressing the Ctrl key will do the opposite; dragging a second selection which touches the first will subtract that form from the first selection (difference). ( Just pressing Ctrl while drawing selections won't do anything, the selections have to cross each other).

If you press both the Ctrl and Shift keys simultaneously, you'll get the intersection of the two, i.e. only the portion which is part of both selections.

While making these additions or subtractions, remember "errare humanum est". It may be wise to keep your middle finger prepared to press the right mouse button. If you do this and then release the left mouse button, the selection you are drawing will disappear. This possibility to Undo a selection before it's finished is useful when you add or subtract or intersect. When you decide you don't like the selection you're drawing, you can undo that selection without also erasing the other "good" selections.

Moving selections

Moving selections in GIMP is not altogether intuitive, and you may well get a bit confused at this.

When you have made a selection in GIMP, the cursor will automatically turn into a move symbol (crossing arrows), and you can move your selection with its contents (although the selection tool is still active and not the Move tool). The thing is, this makes your selection float! If you don't know what floating selections are - read about it in chapter 12.

When you try to do this a second time, you 'll just form a new selection inside the old one. This isn't really a selection yet - the dotted outline is gray instead of black, and it doesn't blink. Note that this doesn't happen when you place a text selection, because then no select tool is active.

This gray subselection won't turn into an active selection until you save or delete your float. But you can use it as a mask effect. What happens is that your selection turns white (if that's your background color) - it's only inside the boundaries of the gray-lined marquee(s) (you can make lots of them with Shift) that you can see the original contents of your selection. This is a nifty little effect, but it can be rather annoying if it happened by mistake (not uncommon) Don't panic - just press Ctrl-Z (Undo) and you'll be back where you were. Read about the Move Tool for more information on moving selections.

To place your selections exactly where you want them, use the horizontal and vertical guides which can be drawn straight from the left or upper ruler. To change the position of the guides, you must use the Move tool (notice how the move symbol changes into a pointing hand when it touches a guide). Snap to guides is the default set in the Wiew menu. If this option is checked, moving any kind of selection close enough to the guides, automatically causes it to "stick" or snap to it. You can for example decide exactly from which point of origin you want your square or ellipse selection to start. If you use the Ctrl key, and start dragging close enough to the point where the guides cross, that will be the centre of the new selection. Without Ctrl, the selection will start from the cross and continue in the direction you drag. You can easily adapt the size, shape and position of a rectangular or ellipse selection to the guides by drawing it within the frame of two vertical and two horizontal guides.

Rectangular and ellipse selection tools

It's pretty obvious what these selections look like. If you don't use any keys, you'll draw normal rectangular and ellipse selections, starting from the corner where you first pressed the mouse button, but if you want to control the geometric forms you must use the Ctrl and Shift keys.

The Shift-key constricts the selections to perfect squares and circles. The selection starts from the corner, and continues in the drag direction.

The Ctrl-key draws normal rectangular and ellipse selections, but with this key, selections will emanate radially from the point where you start dragging. This point is now the centre of your selection.

Using both Shift and Ctrl results in circles or squares (as with Shift), but they grow from the centre an outwards (as with Ctrl).

Now, if you want to use Shift and Ctrl for operations like adding, subtracting or intersecting, and at the same time use Shift and Ctrl for the operations mentioned above, it gets a bit complicated - but not impossible! (Thanks to Nick Lamb for helping out with this one!)

What you have to do is this. First you must decide what the selection will be used for:

  • If you want to make many selections, or add to an existing selection Use Shift
  • If you want to subtract this selection from another selection Use Ctrl
  • If you want to make an intersection of two selections Use Shift and Ctrl

When you have decided, hold that key and then press the mouse button. Then release the key but not the mouse button. With this you have told Gimp what action you want the selection to take. Now, hold a key of your choice while dragging. This key determines what shape or starting point you want for your selection.

This procedure makes it easy to add a rectangle to a selection, or make subtractions with squares or circles. It is, however, rather tricky and if you want to do some serious work using these commands I strongly recommend that you plan ahead, and that you always use the guides and rulers to place new selections correctly.

You can, of course, always use Channels to perform such operations. By making white circles in a channel and putting black ones on top of them, you'll subtract a circle without having to remember what key to use, exept Shift for circle. Read more about making selections with Channels in chapter 12.

If you double-click at the symbols in the toolbox, you'll get a little window showing you the tool options.

For the rectangular select tool, the only option is "Feather". Feather means that you can choose to make the peripherical parts of your selection transparent - opaque in the middle, and more and more transparent as you get closer to the edges. This is very useful if you want to make something look soft and blurry, like soft shadows or glowing edges, or if you like to use collage-tecniques with the Paste Into command, where the image you paste into your selection will get soft and transparent at the edges and blend in nicely with your background. It is also usually a good idea to use a small amount of feather if you mean to select something which is to be copied, moved or cut and pasted, because the feathered edges will compensate for an imperfect selection edge and make it blend into the background.

For the other select tools there is also the option "Antialiasing". Antialiasing is an effect used on curves, which makes the curve look softer and smoother. The most common use is the antialiasing of letters in bitmapped images (like in GIMP or Photoshop) because it takes away the jaggies (the visible jagged and pixly edges of the letter's curves in low resolution). What it does is to softly blend the edge pixels with the background, which will make curves look a lot better, but also a bit blurred. So, you gain in smoothness, but lose in sharpness.

The Free selection tool

The free selection tool works just like Photoshop's lasso, you simply draw a free form with it. Either you close it yourself or if you just draw an open form, the lasso will close it for you.

It's seldom works to try and select a complex area with just one selection tool. The lasso is an exellent tool to fix up selections with. If you see that you've missed some pixels, it is easy to correct this with Shift or Ctrl+ lasso. (As I'm sure you have noticed, the mouse isn't a very sophisticated drawing instrument. The good news is that the GIMP now fully supports ArtPad, a pressure-sensitive digital pencil. X programs have supported Art Pad as a substitute for a mouse for a long time. This means that you could use it as a pencil, but it was never pressure-sensitive. The GIMP now has patches to make this work. Believe me - working with lassos, pencils and brushes is dramatically different with an accurate tool.)

The options for the free selection tool are the same as for the Ellipse selection tool - Antialiasing and Feather. Read about it in the section above.

Fuzzy select

It looks as the Photoshop Magic wand, and it works much the same way. The magic wand works by selecting adjacent pixels of similar color. It starts selecting when you click somewhere. The wand will select the color on the spot you clicked on, and continue outwards until it thinks the color gets too different.

There is no control button in the options dialog that determines how sensitive you want the the wand to be. Instead, after you position the cursor and press the mouse button, you have to drag the marker (don't release the mouse button yet)from the upper left corner, either to the right, or straight down (that doesn't matter) to go from a small, stingy selection to a very generous one.

Word of warning! Check out you point of departure - if you pointed a little awry you might get the inverted selection of what you wanted - i.e. the wand selects everything exept your choise (Black, antialiased object on white background - you can get a white to gray selection instead of a black to gray one if you are not careful). Needless to say, the wand is the perfect tool to select sharp-edged objects with similar colors.

It is easy and fun to use, so the beginner often starts out with using the wand a lot. A more experienced user will find that tools like the Bezier tool, Color Select or Alpha Channels are much more efficient for selection, and use the wand more and more seldom, exept for touching up imperfect selections, where the wand is very useful indeed; for example in effectively removing remains of background color from a cut and pasted selection.

In the options dialog box there is a checkbox called "Sample Merged". This is an option available when you use color for an operation. It becomes relevant only when you use several layers. If this option is unchecked, the wand will only react to the color in the active layer for your selection. If it is checked it will act as if the image was flattened (layers merged) and use the merged color as it appears on screen with all layers visible.

The Bezier selection tool

This is to my mind one of the most useful tools. You'll find Bezier curves in all self-respecting drawing or imaging software.

There's the "Pentool Paths" in Photoshop, and most drawing (in programs like Corel, Illustrator, Freehand or even in 3D programs) is done with Bezier curves. Because the GIMP is based on bitmaps and not vector graphic, you can't draw with Bezier curves, but you can make really advanced selections. (I don't count making a Bezier with a border and then fill the border, as drawing (It can be useful to do this, but it is normally better just to draw in a drawing program, convert it to suitable format and import to the GIMP).

You use the Bezier select tool by clicking out splines or anchor points in a rough approximation of the shape you want. Don't bother to try and make curves at this stage (unless you really know what you want), just click out a rough, angular shape and make sure you close it by placing the last point into the first and click.

It is, however, a great advantage if you plan the placement of the anchor points, because in the GIMP, there is no way to remove or add anchor points with this tool. This means that you have lesser control over your curves. You can't regret anything, so watch out where you put your splines! Also, don't use too many - you only need one for every curve segment. ( Removing/adding anchor points would be a most wanted feature in the next GIMP version!)

Now, you can start to modify - i.e. to make curves of the straight lines. When you click on an anchor point, two little handles appear. If you pull the handles, they will change size and direction and shape a curve. Long handles result in a flattened curve, and short ones in a sharper curve. You can also turn the handles in the angle and direction you want them.

The first thing you'll want to do is to move the splines to their correct position. By pressing Ctrl, you can drag and drop an anchor point any way you like. The other important thing to do is to determine what splines are to be soft, and which are to be angled. By default the handles are equal and make soft, wide curves.

When you need a sharp corner, you have to press Shift. Now each handle is managed separately, and you have total control over the shape of your curves.

When you're happy with your curve, just mouse click inside the curve, and it will turn in to a selection.

The options for the Bezier tool are Antialiasing and Feather. Read more about it in the section on Rectangular and Elliptical selection.

Intelligent Scissors

This seems to be a very interesting piece of equipment. Intelligent Scissors is currently not enabled for use with the tile-based GIMP. More about this tool when GIMP is released in a version where it is available.



[Top] [Prev] [Next] [Bottom]

karin@frozenriver.ale.se
Copyright © 1997, Karin Kylander


With any suggestions or questions please feel free to contact us