Working with Layers

One of the problems with most bitmap graphics formats is that it's difficult to manipulate individual components in the image. For instance, you can't easily move a circle from one location to another. Although many graphics programs, including the

GIMP, do provide cut and paste operators, they cut and paste everything in the selected area—for instance, both the circle you want to move and any objects "beneath" the circle. If the circle is opaque, cutting it and moving it elsewhere will leave a big gap in the image.

One solution to this problem is to use a drawing program that operates on discrete objects. Drawing programs are frequently components of office suites, as described in Chapter 7, "Using Linux for Office Productivity," and there are also stand-alone drawing packages, such as Xfig ( Drawing packages are seldom well adapted to working with bitmap graphics, though. If you want to manipulate digital photos, scans, screen shots, or other bitmap graphics, another solution is needed, and the GIMP provides one: layers.

Layers are individual bitmaps that you can move and otherwise manipulate within an image. For instance, if you want to create a screen shot with added text to highlight specific windows, buttons, or other features, you can use one layer for the screen shot proper and one layer for each text element or line. You can then move the text elements around on the display until they look good. The GIMP remembers the entire underlying screen shot and so can restore the part of the image that had been under the text elements when you moved them. Essentially, each layer is an independent bitmap image that combines with others into a greater whole.

One of the primary tools in manipulating layers is the Layers, Channels & Paths window (the upper-right window in Figure 8.6). Operations you can perform with layers include:

Creating New Layers To create a new layer, you can right-click on an existing layer in the Layers, Channels & Paths window and select New Layer from the context menu, or click the New Layer button, which resembles a single sheet of paper. The result is the New Layer Options dialog box, in which you set the size of the layer, its name, and its fill type (how it interacts with other layers). When you first create text, the text is in a special type of layer known as a floating selection. You can click this layer in the Layers, Channels & Paths dialog box and click New Layer to make it a regular layer, or select Anchor Layer to tie the text to the background layer.

Moving Layers To move a layer, pick the Move Layers & Selections tool in the GIMP's main window (the second icon on the second row). You can then select the layer in the Layers, Channels & Paths dialog box, hold down the Shift key, and move the layer by clicking it and moving it in the drawing window.

Change Layer Order When more than two layers are present in the Layers, Channels & Paths dialog box, you can select one and move it in relation to the others by clicking the up and down arrow buttons. This action will affect which layers obscure which others in the final image.

Changing Layer Opacities Select a layer in the Layers, Channels & Paths dialog box and adjust the Opacity slider to make it more or less opaque.

Merging Layers You can merge the visible layers (those with eye icons next to them in the Layers, Channels & Paths dialog box) by picking the Layers O Merge Visible Layers option from the context menu. You can merge all layers by using the Layers O Flatten Image option.

You can use layers in many different ways. Layers of varying opacity can create double-exposure effects or add one image to another—for instance, you can add an image of the full moon to the sky in a night photograph, or create many other special effects. You can merge layers created from cut-out portions of one image to create special color effects for only parts of an image. Layers enable you to easily position elements such as text callouts on an image.

One important detail relates to saving images with layers. The GIMP's native file format, XCF, supports layers; but most other file formats, including common ones such as the Joint Photographic Experts Group (JPEG) and Tagged Image File Format (TIFF), don't support layers. Therefore, you must flatten an image to a single layer before saving in these formats. To do so, right-click in the image and pick Layers O Flatten image from the context menu. You'll then be able to save the image in these common file formats. Recent versions of the GIMP can flatten an image automatically while saving it to a format that doesn't support layers, so you can save to such a format without flattening the original.

Tip Before flattening an image, save it in the GIMP's native format. That way, if you need to further manipulate the layers, you can do so. Applying Filters

The GIMP includes many built-in filters that enable you to easily create assorted special effects. These filters fall into several categories:

Blur Blur filters introduce a controlled blurring of the image. You might use these to soften the outline of an artificial shadow or to de-emphasize wrinkles or other imperfections in a portrait.

Colors Color filters add or modify colors throughout the image. Some of these effects can also be achieved through items on the Image O Colors context menu.

Noise These filters add random elements to the image, simulating effects such as film grain or television static.

Edge Detect Edge detection creates an image that emphasizes the edges of an object, similar to a line drawing. Using edge detection can be an important first step in some advanced uses of layering; you use the original image as one layer and the edge-detected image as another that you can manipulate.

Enhance Enhancements allow you to correct some types of problems in the original image. Examples include despeckle (which softens film grain and similar effects) and sharpen (which sharpens a blurry image).

Generic This category is devoted to advanced filters best described through mathematics.

Glass Effects You can distort your image so that it looks as if it had been photographed through an extreme wide-angle or other type of lens or mirror with these effects.

Light Effects These effects apply simulated lens flare, glare, and similar light effects.

Distorts These filters twist, warp, and otherwise distort the image. You can create artificial water ripples, curve text into a circular shape, and so on with these filters.

Artistic You can make an image look like a painting in various media or styles with these filters.

Map These filters map one image onto another using complex rules. For instance, you can take an image such as a two-dimensional world map and wrap it around a virtual sphere, creating what is effectively an image of a globe.

Render This category is broad; it includes assorted effects that create new layers or impose elements designed to resemble common natural features on the image.

Web The Web Image Map filter is designed to help create an image map for web page navigation.

Animation Various filters support creating animations—files that consist of several images designed to be viewed in succession, creating an animation effect.

Combine You can merge multiple files together in various ways with these filters.

These filters deliver a lot of power, and learning what they do takes time and experience. I recommend you try these filters out on a variety of images. Also, keep in mind that you can apply most filters to just part of an image by first selecting the target portion. For instance, you might warp some text to create an unusual effect for a poster, but leave a photograph for the same poster untouched.

0 0

Post a comment