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]



Layers


Layers

I have read that some GIMP-users find the concept of layers hard to grasp. It shouldn't be that way though, because using layers is really as simple and straightforward as wearing layers of clothes on your body. Once you have started to use layers, you won't understand how you could ever do without them!

Adding layers to your image

Open the Layers & Channels dialog box in the Layers menu. The dialog box has an Image menu, where you can see the name of your image. If you are working with several images this is very useful, because all open images are listed here, and you can choose the one you want to work with by clicking its name.

There are two tabbed folders - one for Layers, where you are now, and one for Channels (Channels will be discussed later in this chapter). There is also a drop down menu for Modes, an Opacity slide bar, and a Keep Transparant button.

In the window, you will see a thumnail icon of your image. There is an eye symbol to the left of it, and you can see that your image is called "Background". Try clicking at the eye, and you'll find that your image disappears! Click again and it comes back. The eye symbol allows you to toggle on/off layers, so you can work with a particular layer without having to see all other layers. If you Shift-click on an eye icon, all layers exept that one will be hidden from wiew. To toggle on the other layers, Shift-click again. Now, press the right mouse button with the cursor placed on the thumnail image or the layer name. This brings up a Layers menu with a few more options than the regular Layers menu (the one you get when you right-click in your image). Choose the first option on the list called New Layer.

When you choose "New Layer", you'll get a little dialog box asking you some questions about the new layer. Here you name your layer. You can for instance call it "shadow" if you mean to create a shadow of an image object in this layer. It's a good idea to name your layers if you work with many of them, especially when you use similar layers with different functions. You can also change the size of the layer, but you don't really have a reason to do this unless you mean to copy and paste it to another image with a different size. The last thing to decide is what layer fill you want. The options are; Background, meaning your current background color in the toolbox, White and Transparant, where transparant is the default fill. Press OK, and you have created a new layer on top of your background.

Now, when you have two ore more layers, it's really important to know which one is the active layer. The active layer is marked with blue color in the dialog box, and you can make another layer active by clicking its name beside the thumnail. As soon as you have several layers in an image GIMP reacts only to the active layer, so you can only work in one layer at a time.

If you click beside the eye symbol, you'll get a new icon - an anchor. This enables you to anchor some of your layers. Anchoring layers means that all layers with the little anchor symbol are locked in relation to each other, so you can't move one layer without moving the others at the same time.

To understand the "Keep transparant" button, you first have to draw something in a transparant layer. Make the layer active, and paint something with the paintbrush (with the button unchecked, which is default). Now, press the button, change the color of your paint, and start painting again. You'll find that you can only paint the opaque areas - i.e. the ones you already painted. The purpose of Keep Transparant is to protect the boundaries of opaque shapes in a transparant layer. It also makes it very easy to change their color, you never have to worry about painting outside of edges etc. If you want to use a filter on a layer, you usually don't want this option checked, because then you'll only get the filter effect inside of the shape.

If you want to rename a layer you just double-click on the layer's old name and you'll get a dialog where you can type the new name.

Remember that your original image was automatically named "Background"? The background layer doesn't react quite as the other layers, because it isn't really a layer - it's a background. The background image works the same way as it did when you didn't have layers. When you cut parts of it, or use the eraser, the background color shows - not a transparancy. You also can't use layer masks on it or raise it. Normally, you have no need to do these things on a background, but if you want to anyway, just rename it and it will behave like any other layer.

Now, let's take look at the other options in the Layers menu.

Raise Layer and Lower Layer

These commands move the active layer to a higher or lower position in the layer hierarchy. You can only raise or lower a layer one step at a time, so if you want to move a layer near the background to the top, you have to keep raising it step by step, until you are satisfied with the position.

Duplicate Layer

Makes a copy of the active layer, and places it immediately above the original.

Delete Layer

Deletes the active layer.

Scale Layer

Shrinks or enlarges the layer and its contents

Resize Layer

Changes the size of the layer, but not its contents. If the contents of the layer is larger than the new layer size, the image or selection will be clipped to fit the new size. There is also an offset option, where you can decide how the layer is to be placed in relation to the image border.

Add Layer Mask

Thiss an advanced option. You use a Layer Mask when you want to change the alpha values in a layer. If you don't know what alpha values are, read the chapter on Channels.

When you add a layer mask to a layer, you always work with a grayscale image (you can use colors, but they will appear as shades of gray in the mask). In the layer mask, black stands for transparant and white for opaque. When you choose "Add Layer Mask", you'll first be asked what initial fill you want; white, black or layer's alpha. If you choose black, you start out with a transparant mask, white gives an opaque mask, and layer's alpha means that the mask will use whatever alpha values your layer has. When you have chosen the initial fill, a small layer mask icon appears next to the layer thumbnail. To switch between layer mask and layer you click at the appropriate thumbnail. To create the mask, you can do a number of things.

A very useful mask can be made from a gradient fill. A gradient results in the top layer gradually blending with the background. You can paint degrees of transparancy where you want it, or use filter or a pattern to create an interesting mask. You can use selections, or paste an image into the mask. In short, this is an extremely versatile and powerful instrument.

To work with the mask, the little thumbnail is quite insufficient! Use Alt-Shift-click on the mask icon, and you'll see the mask on your image (note that the mask icon is now lined with green). When you want to check the result of the mask Alt-Shift-click again, and you'll see what your image looks like with the mask effect. To see your image without the mask Ctrl-click on the icon (the thumbnail is now lined with red), Ctrl-click again to return to the mask.

Apply Layer Mask

Apply Layer Mask is used when you're happy with your mask, or if you hate it and don't want to use it.The choice is clear - apply or discard.

Anchor layer

Anchor layer is used for merging floating selections with a layer (the layer which was active before you placed the float.). If you don't know what a floating selection is, check out chapter x.

Merge Visible Layers

This function merges all layers with the little eye icon turned on. Non -visible layers are not affected. The options "Expanded as necessary" and "Clipped to image" result in the same: the final layer is big enough to fit all layers, but no larger. "Clipped to bottom layer" results in a final layer with exactly the same dimensions as the bottom one.

Flatten Image

Merges all layers without exeption. Remember that you must use Flatten Image before saving your image, if you mean to save it in any other image format than XCF and GIF. (Also, remember to erase your alpha channels, if you have made any in the Channels folder - many image formats and printers don't understand alpha channels)

Alpha to Selection

Alpha to Selection is a very powerful command. Alpha to selection is used when you want to transform opaque or semi-transparant shapes in a transparent layer to a selection. This command is so useful, that you use it nearly every time you work with a layered image. Think of it, the form, or shape of things is what you work with in the different layers. If you work with an image of, say, a saucer, you'll want to place a copy of the saucer shape under the actual saucer to create a saucer-shaped shadow. Then, you want another saucer copy to accentuate highlights in the porcelaine, and another to show dark areas, and another with a special pattern on it, and another...etc. You get the hint? Every time you just want the empty shape or the selection of the saucer, not a copy of an image with a saucer in it. This is why Alpha to Selection is so important. The pure shape of an object in the form of a selection goes through all layers, you just activate the layer you want it in, and start working!

Mask to Selection

Mask to Selection is the equivalent of Alpha to Selection, but for masks. You don't use Mask to Selection as often as Alpha to Selection, but if you've made a good mask it is great to be able to use it again in another layer.



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

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


With any suggestions or questions please feel free to contact us