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]



Channels and Floating Selections


Channels

If you click on the tabbed folder marked Channels next to Layers, you'll get closer aquainted with the wonderful world of RGB- and Alpha Channels.

RGB Channels

When you open the Channels dialog, you'll see the three RGB-channels. Each channel represents the Red, Green or Blue color value of the pixels in your image. Think of the RGB channels as grayscale representations, where "white" is replaced with 100 % color. Pure red in the red channel is the equivalent of a red value of 255 for that pixel, black means that the pixel has no red in it at all. As opposed to Layers, the RGB channels are all active at the same time. The RGB channels are also equipped with eye icons, so you can choose to watch your image in a single color channel. If you want to, you can choose just to work in one or two specific color channels, by clicking at them (click an active channel and it becomes inactive, and vice versa).

Normally, there isn't much use in working directly in the color channels. If you are very skilled, and like to experiment with patterns and advanced coloring, this can be of interest though. You can for instance erase or add parts to the red channel, or try a filter on the blue channel etc. Just remember that the channel operation only affects the active layer.

Sometimes a shape appears more clearly in a certain RGB channel than in the others, you can use this to your advantage by doing the selection work in this channel.

Alpha Channels

No, the real reason to use the Channels dialog is that you can store and edit selections in Alpha Channels! Whenever you make a selection which is more complex than a square - save it! You are most probably going to need it later.

What are Alpha Channels?

The Alpha value describes the amount of transparancy in a pixel. Just as each pixel has a value for the Red, Green and Blue channels in the RGB system, it also has an Alpha value. Check this out with the Color Picker! As with the RGB-channels, pixel values in an Alpha channel ranges from 0 to 255. The max value (255) refers to 100% opaque, and 0 means totally transparant. When you create a new Channel, you create a mask which can be translated to an Alpha selection and be applied to a layer. These channels are always grayscale images (you can use colors, but they will appear as shades of gray in the channel). Black represents transparant and white opaque, the grayscale in between represents different levels of transparancy.

Storing selections

In the Select menu there is an option called "Save to Channel". When you have made a selection, choose the Save to Selection option, and open the Channels dialog. You'll find that you now have a new channel called "Selection Mask copy". The channel is a grayscale version of the selection you just made. Don't forget to name the channel - this is important, because selections stored in channels aren't easily recognized. To name the channel, double-click its old name, and a dialog box appears. Name the new channel "saucer shadow" or whatever your selection represents (or will represent when you have edited it). You can set a fill opacity value in the popup dialog box, but it doesn't affect the alpha values in your channel. The reason you set the fill opacity to a transparent value is that this enables you to see your image through the black parts of the channel. If this was not the case, it would be impossible to edit the channel according to the image.

When you want to use the selection you just stored, click the right mouse button on the channel's name, and the Channels menu appears. Choose the last option on the drop down list called "Channel to Selection". This option creates a selection based on your channel - just switch to the Layers folder and your selection is ready for use!

Editing Alpha Channels

The Channels menu should be easy to understand. You can create a new channel, raise or lower your channels, duplicate or delete them and change them into selections. You can't merge channels, unless you first copy them and paste them into layers. You can merge those layers with the "merge visible layers" command, then you copy or cut the layer and paste it into a channel again. As you see, the contents of channels and layers can be edited just as an in ordinary images. You can paste an image or a layer into a channel, and vice versa. You can paint, adjust image values, make selections or use filters on Alpha channels. This makes Channels the most powerful tool for creating advanced selections there is!

Floating Selections

What is a floating selection?

When you first place a text string, move a selection or choose "Float", your free, empty selection is transformed to a floating selection with a pixel content. This means that the selection contains information which isn't attached to any layer - it floats independently, and changes to a floating selection can't affect the rest of the image (all layers are grayed out). You're restricted by the "marching ant" border in floating mode, but you can still do a few things:

A. Change the color, Image options or use filters on your selection

B. Use the Eraser to reduce the selection, or edit it with cut/copy/paste etc.

C. Move the selection.

The one thing you can't do with a floating selection, is using any of the "Select" commands.

If you choose "Anchor layer" in the Layers menu, the float will merge with the layer that was active before you placed the float.The simplest way to anchor a floating selection is of course to just mouse-click (outside the floating selection if the Move tool is active). If you save a float as a new layer, you'll get an adapted size of the new layer. It looks like a dotted yellow/black rectangle around your image object. In the GIMP, such a layer border will appear whenever you save a floating selection in a layer. In Photoshop all layers are the same size as the image, but the GIMP adapts the layer size to the size of the floating selection you place in it. A float layer border constitutes the very boundaries of the drawable surface in the floating layer. This means that you can't paint or make a selection outside of this border. When you use the Move tool to move the image, you move the entire layer around.

Moving objects in a floating selection layer (like letters in a text for instance)

To move an image object in a floating selection layer, like a character in a text string, you must first select it (the lasso is a good choice). As soon as you try to move this letter, it will instantly turn into a new floating selection. When you have moved it and released the mouse button, you have to change to the Move tool, or you'll just get irritating subselections (as discussed in "Moving Selections"). To get around this, don't move the selection with that first automatic Move-cursor. Instead, select Float in the Select menu, then choose the Move tool, and feel free to move your letter. When you're happy with the position of the letter, anchor it to the layer with Anchor Layer.

Tips on working with floating selections

As you may have noticed, floating selection in the GIMP works a bit differently than in Photoshop. If you want to apply any of the selection options in the "Select" menu to an image object on a transparent layer (like a text string for instance), it's a good idea to work like this:

Use a different layer for each effect you want.

Put the float in the top layer. Just double-click at the floating selection in the Layers dialog, and you'll automatically place it in a new layer called "Floating Selection" or "Text layer" if you're placing a text string. Note that, in this layer, you can't use the Select menu options yet, because nothing is selected.

To achieve effects like Border or Feather, you must first select the image object with the "Alpha to Selection" command. This results in an ordinary non-floating selection, because this command selects everything with an alpha value > 0, i.e. everything opaque or semi-transparent in the layer ( If Alpha = 0, that pixel is transparent)

If you stay in the floating selection layer after doing this, you'll have to uncheck the "Keep Transparent" button, to work with a changed selection size. Remember that in this layer, you must use the "Keep transparent option" if you want to fill the text with color (you also must remember to "Select All" to paint all letters at the same time if you use the "Bucket fill" ). If the "Keep transparent option" is unchecked, you will fill the entire layer with color and you won't be able to see your text anymore (not too smart).

The floating selection layer has a reduced size, which means that filter effects and large selections are limited, they get "cut off", because there isn't enough space. Also, if you make too many changes in the original layer, the pure form of the shape (especially for letters) will soon disappear.

It is better to change to a lower layer to make special effects (the selection goes through all layers, and you can choose any layer you want to work in). In these other layers, there is no tiny layer size to restrict you, and you don't need to think of "Keep Transparent".



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

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


With any suggestions or questions please feel free to contact us