M O R E O N G R A P H I C S : T H E G I M P
The GIMP, which stands for the GNU Image Manipulation
Program, is an open-source program comparable to the pop-
ular Adobe Photoshop application. Both Photoshop and The GIMP
are huge applications, with many features that can take years to mas-
ter. Covering The GIMP is a book-worthy project in itself; in fact, several
excellent books have been written on the subject. Check out Grokking the GIMP
by Carey Bunks, published by New Riders Press, or the invaluable The GIMP
by Karin and Olaf S. Kylander, available online at http://gimp.org/ or
in printed form as GIMP: The Official Handbook from The Coriolis Group. The
http://gimp.org/ site includes FAQs, cool effects you can download and use,
and samples of artists' work to inspire you.
The GIMP, like Photoshop, is a bitmap application. In other words, it uses
pixels to represent colors and shapes. Use The GIMP to create your own origi-
nal works of art using various painterly effects and tools, or manipulate,
retouch, and otherwise alter photographic images you have scanned into your
computer. You can even create animated banners and buttons for the Web.
This chapter doesn't explore the whole range of GIMP possibilities, but it
does examine some simple basics that will allow you to retouch photos, add text,
and otherwise jazz up images with special effects. If you keep working with The
GIMP, you may eventually become a GNUexpert!
6594 LITW Chapter 8 9/12/02 3:54 PM Page 135
For those who have worked with Adobe Photoshop previously, The GIMP will be
both familiar and strange. The user interface for The GIMP looks at first exactly
like Photoshop, but some of the options are different. The GIMP also makes
heavy use of the right mouse button. Many menu options that appear at the top
of the screen in Photoshop are available via a quick right- click in The GIMP
(including Save). This takes a bit of getting used to, but it is quite convenient
once you've developed the habit.
To launch The GIMP, go to the K menu, and scroll to Graphics (or your dis-
tribution's name). The GIMP will appear under the subheading Graphic or
under the distribution name (for instance, Debian).
T I P
You can launch The GIMP directly from the command line or a Run Command box
simply by typing
The GIMP's opening screen will load, and a tip of the day will appear, after
which you'll move into the application space itself. Version 1.2 of The GIMP has
the added feature of opening with whichever menus you left open the last time
you used it. If you close all the menus when you're finished, it will open with
only the toolbar visible.
All of the tools on the toolbar are also available with a right- click of the mouse
anywhere within an open image, so you may find that you don't need the tool-
bar to be visible at all times.
Figure 8.1: When You First Launch the GIMP, You'll Be Presented with a Toolbar
6594 LITW Chapter 8 9/12/02 3:54 PM Page 136
More on Graphics: The GIMP
File and Xtns
First are the basic File and Xtns menus. From File, you can open files or access
dialog boxes, where you'll find the Brush, Pattern, Palette, and Gradient menus.
These menus allow you to choose brush size and type, color, and gradients, and
all are very intuitive. If you select Acquire from the File menu, you can use The
GIMP to take screenshots as well. This works in almost exactly the same way as
KSnapshot (see Chapter 7). The Xtns menu provides access to extension and
module menus. These are for creating effects and are meant for advanced users.
It is probably best to leave all of them at their default settings. The ever-popular
Script-Fu (more about Script-Fu later) and direct web links to GIMP resources
are also available from the Xtns menu.
At the bottom left of the toolbar is the Color Selection menu, where selected
foreground and background colors are visible. Click the arrow icon to toggle
foreground color to background color (the defaults are black and white).
Double- click either color to open the Color Selection menu and choose a new
color. Here you can scroll through a rainbow- colored bar to select a hue range.
Click within the large hue range window to select a color tone, or manually
enter or adjust HSV (hue/saturation/value) or RGB (red/blue/green) color-
value numeric equivalents.
T I P
Painting tools in The GIMP draw in the foreground color, and the background color is
the color of your canvas. When you move selected areas or use the erase tool, the
background color appears. Click the arrow icon in the Color menu to toggle between
foreground and background colors.
Figure 8.2: Selected Foreground and Background Colors Shown in the Color Menu
The Dialog menu located at the bottom right side of the toolbar allows for quick
access to the Brush, Pattern, and Gradient menus, and it also provides a thumb-
nail that shows which brush, pattern, and gradient is activated for your reference
Figure 8.3: Dialog Menu
6594 LITW Chapter 8 9/12/02 3:54 PM Page 137
from the toolbar. If you select something other than the default for any of these
three, that change will be reflected in the Dialog menu icon on the toolbar.
Access the Brush menu by clicking on the top left block in the Dialog
The Brush menu is used in conjunction with the pencil, paint, and ink tools
to control the thickness and type of strokes these tools make. Click on the top
right block to reach the Pattern menu, but remember that the icon changes to
reflect the active pattern.
Figure 8.4: Brush Menu
Figure 8.5: Pattern Menu
6594 LITW Chapter 8 9/12/02 3:54 PM Page 138
More on Graphics: The GIMP
Likewise, the rectangular box on the bottom shows the current gradient,
and clicking on it activates the Gradient menu.
T I P
Double-click on any tool to access its Option menu. The Option menu allows you to
adjust the settings for the tool.
T I P
If you let your mouse pointer hover over any tool, a small box will appear telling you
what the tool is.
Figure 8.6: Gradient Menu
Three selection marquee tools allow you to select a rectangular, circular, or free-
hand area within your image. These selection tools may be all you need in some
instances, but for more control, you may want to move to the following set of
more intelligent selection tools.
Figure 8.7: Selection Tool Icons
Figure 8.8: More Advanced Selection Tool Icons
6594 LITW Chapter 8 9/12/02 3:54 PM Page 139
Next we have the fuzzy selection, Bezier curves, and intelligent scissors tools.
When you want to grab parts of an image, manipulate, scale, distort, move, or
color- correct only a portion of your image, The GIMP provides these selection
tools, offering a range of simple to precise control.
Click within a photograph with the fuzzy selection tool, and the tool will
select similarly colored pixels. You can increase the "fuzziness" of the tool in the
Options window. With a fuzziness setting of zero, The GIMP will search for pix-
els of the same color as the one you select by clicking within the image. Increase
the fuzziness setting to allow The GIMP to search for an increasing range of
color density from the selected pixel--for instance, not only black, but also a
range of grays. The higher the number in the setting field, the more grays will
Leave the anti-aliasing radio button on for all selection tools. The anti-
aliasing setting allows The GIMP to blend areas of high contrast a bit at the
edges, which reduces the jagged edge you would see in a strictly black-and-white
pixel halftone image. The Feather option allows any selection to have a partially
transparent edge, for a blurry effect. The Sample Merged option is used only in
multiple-layered files, where the current layer includes a layer mask or a setting
other than Normal and allows for pixel data from subsequent layers to be
included in the selection.
The Bezier tool works a bit like a pen and is the most precise tool for select-
ing areas within an image. With it, you can draw curves with editable splines
(the lines that appear as you drag the cursor about the selection area with the
Bezier tool and anchor points) around shapes for more precise control. This
tool takes a bit of practice, but it will be familiar to previous users of any vector-
drawing application, such as Adobe Illustrator or Kontour. If you don't have
such experience, practice some, and you'll get the hang of it. Keep in mind,
however, that you can't add or subtract anchor points (which look like small
blocks) like you can in Adobe Photoshop.
Once you've roughed out a shape by clicking around the image area you
want to select, click the first anchor point again to close the shape. Next, posi-
tion the cursor over an anchor point, click, and lines will appear. You may use
these to pull the spline between anchor points to curve around areas for com-
plete control of your selection. Press the
key to reposition anchor points,
or press the
key to change an anchor point from its default soft corner to
a sharp one. When you are satisfied with your spline and anchor point place-
ments, click inside the closed shape to turn it into a selection. If you want to
select everything else in the image, right- click and choose Selection · Invert to
select everything but the outlined image area.
With the intelligent scissors tool you can "draw" around areas of high con-
trast within the image. This area then becomes the selection when you click
inside the created shape. You can use the tool's Options menu to set the selec-
tion sensitivity and convert your selection to Bezier curves. You'll get other selec-
tion options by right- clicking and choosing Select.
6594 LITW Chapter 8 9/12/02 3:54 PM Page 140
More on Graphics: The GIMP
Move, View, and Crop
The next set of tools allows you to move an entire image or a selection within
the image, increase (by left- clicking the image) or decrease (by pressing the
key) view magnification, or crop the image.
Move literally means to shove a selected area or the entire image within the
image window. The background color or subsequent layers will then appear
beneath the moved selection.
Cropping allows you to focus on only the part of the image you want to
work with, discarding the rest. Click the Crop tool button, then drag the mouse
so that the area you want cropped appears in the square. You will see a window
called Crop Information, which gives you the dimensions of the cropped area. If
you click the Crop button, you will be left with only the selected area of the
image. The rest will disappear.
Transform, Flip, and Text
Figure 8.9: Move, View, and Crop Tool Icons
The transform tool allows scaling, rotation, shearing, or perspective scaling of a
selected area or the entire image. The perspective scale allows you to stretch and
compress parts of the selection to give the illusion that elements of the image
are closer or farther away from the viewer.
The flip tool flips the image on a horizontal or vertical axis. These settings
are available in the Options window.
The text tool allows the addition of words to the graphic. Use this tool only
for large-sized text, a small amount of text, or text in images intended for on-
screen viewing. Fonts loaded on your desktop's X server will appear in the Font
menu. The text will be drawn in pixels, not in mathematically defined curves as
with a word processor or vector application. If you need perfect text clarity or
have a lot of text to add to your image, save your GIMP image in JPEG, TIFF, or
EPS format and import it into an application such as Kontour or OpenOffice,
which handles text and drawn elements mathematically rather than as collec-
tions of pixels, resulting in perfectly smooth text edges. If you do choose to
place text directly within your GIMP image, make sure you are using PostScript
Type I fonts, because non-PostScript fonts will not scale correctly. Check with
your system administrator to ensure that only PostScript fonts are installed on
Figure 8.10: Transform, Flip, and Text Tool Icons
6594 LITW Chapter 8 9/12/02 3:54 PM Page 141
When you click the text tool in the drawing space, a window pops up with
options for font, font size, spacing, and so on. The text will be colored in the
foreground color currently selected. Type the text in the space provided at the
bottom of the window. When you click OK, the text will appear in your image as
a selection. When you click anywhere else in the image, or with another tool,
the text will become part of the image. We'll discuss layers, but keep in mind
that it's a good idea to type text on its own layer.
Color Picker, Bucket, and Gradient
The color picker tool looks like an eye dropper and selects colors from the
image. The foreground color on the Color menu becomes the value of the pixel
clicked with the color picker. This allows you to choose a color from within an
image and paint with it.
The bucket tool acts like a spilled can of paint. It fills a color range with the
foreground color. Use the Options menu to set the opacity, threshold (the sensi-
tivity of the selection), or type of fill. You can also fill your canvas with one of
the patterns available from the Pattern menu by selecting Pattern Fill on the
The blend tool creates a gradient blend in whichever direction you click and
drag the cursor, either for the whole image or within a selection. Use the
Options menu to select the type of gradient and whether it blends from fore-
ground to background color, or repeats in a wave form (useful for making cool
metallic blends), or does something else.
Pencil, Paintbrush, Eraser, and Ink Tools
Figure 8.11: Color Picker, Bucket, and Gradient Fill Tool Icons
The pencil, paintbrush, and ink tools draw in the foreground color. Choose a
size and type of brush to use from the Brush dialog menu. Note that the ink
tool is a new tool, beginning with version 1.2 of The GIMP.
T I P
The Dialog menus are also accessible from the File menu or by right-clicking on an
image and selecting Dialogs from the pop-up menu.
The pencil and ink tools draw with a smooth edge (even if you select a
fuzzy-edged brush). The paintbrush tool paints with a softer, more brushlike
Figure 8.12: Pencil, Paintbrush, Eraser, and Ink Tool Icons
6594 LITW Chapter 8 9/12/02 3:54 PM Page 142
More on Graphics: The GIMP
edge. The eraser tool erases (leaving the background color). Use the Eraser
Options menu to set a hard or soft (incremental) edge.
T I P
On the Brush menu you'll find choices to change not only the type of brush you can
paint with, but also the opacity of the paint. Experiment with the different options to see
all the possibilities for drawing or painting.
Airbrush, Clone, and Convolver
The airbrush tool works like an airbrush and you can set the rate and pressure
from the Options menu. This tool is handy for hand-painting shadows or blend-
ing areas of color. There also are Filter and Script-Fu options for creating drop-
shadows and similar effects.
The clone tool allows you to clone a part of the image with either a pattern
or an area within the image. This is an invaluable photo- retouching tool.
Double- click to set Options; then press
and click the image to select the
area you want to clone. Next, click and drag to the area to be retouched. Add
hair, remove blemishes or scratches, give someone two noses--you can do it all
with the clone tool.
The convolver tool allows blurring or sharpening of pixels. Blur works by
equalizing the color values of adjacent pixels in the area being blurred. Sharpen
does the opposite. The GIMP creates higher contrast between pixel colors,
which helps the sharpened area pop out from the rest of the image. Both effects
can be accessed through the Filter menu (right- click and choose Filter; then
choose either Blur or Enhance). Use the Options menu for the convolver tool to
adjust Blur and Sharpen pressure settings.
Dodge and Burn and Smudge Tools
Figure 8.13: Airbrush, Clone, and Convolver Tool Icons
These tools are new additions to The GIMP that allow you to create further
effects with your images. The dodge and burn tool is for adjusting the bright-
ness or shade, and is especially useful for working with over- or under-exposed
photographs. Switch between dodging and burning with the Options menu.
The smudge tool does exactly what you would think--creates a smudge
wherever you click and drag using that tool.
Figure 8.14: Dodge and Burn and Smudge Tools
6594 LITW Chapter 8 9/12/02 3:54 PM Page 143
Finally, Let's Work with The GIMP!
Click File · New to create a new file. Set the dimensions of your canvas (remem-
bering that there are 72 pixels per inch), the color space (either RGB or
Grayscale), and the base background color of your painting space. Background
and Foreground provide a space in whatever background and foreground colors
currently are selected in the color menu (defaults are black and white). White is
self-evident. Transparent provides an empty color space; a gray- checkered pat-
tern indicates transparency. Choose White while you are first learning the paint-
ing tools and effects. As you become more familiar with The GIMP, you'll find
the Transparent background color to be the more useful option.
Figure 8.15: A Blank Window Appears When You Select File · New
Figure 8.16: The Layers Menu
6594 LITW Chapter 8 9/12/02 3:54 PM Page 144
More on Graphics: The GIMP
To open the Layers menu, right- click the drawing window and choose Layers ·
Layers & Channels. The Layers menu allows you to add or delete levels of paint-
ing surface. This can be helpful when you want to put elements into their own
unique space. You can create new layers by clicking the icon at the bottom that
looks like a duplicated page. Double- click the layer's name to enter a new layer
name. Delete a layer by clicking on the trash symbol.
You can set individual layers to be fully or partially transparent. As you
become a GIMP expert, you'll learn how to mask selected areas to show ele-
ments through one layer to the next.
If you click the Channels tab, you can work with individual color channels
for red, blue, or green. This is a complex subject we won't address here, but it's
helpful to know that, with a bit of additional research and practice, you can gain
complete control over your image's elements and color space by manipulating
layers and channels.
Open a blank drawing window in The GIMP (File · New) and experiment
with the various painting, selection, and transformation tools until you feel com-
fortable with them.
Figure 8.17: Organize Work By Giving Each Layer a Name that Makes Sense to You
Figure 8.18: Play with the Various Drawing and Painting Tools to See How They Differ
from Each Other
6594 LITW Chapter 8 9/12/02 3:54 PM Page 145
To round out our introduction to The GIMP, let's open a sample photo and
practice retouching it to improve image quality. Here we have a photograph of
Linux evangelist and guru Eric S. Raymond and Linux Journal publisher Phil
Hughes taken at the 2000 Annual Linux Showcase tradeshow. As you can see,
lighting conditions were less than stellar, and this photo needs a lot of work.
First, use the Crop tool (right- click and choose Tools · Crop, or select the crop
tool from the toolbar) to focus in on the central figures of the photo.
Figure 8.19: Photograph that Needs Retouching
Figure 8.20: The Crop Tool in Action
6594 LITW Chapter 8 9/12/02 3:54 PM Page 146
More on Graphics: The GIMP
Next, let's take a look at the Levels menu (right-click and Image · Colors · Levels).
By moving the white triangular tab that adjusts brightness levels over to the
edge of the black histogram shape, we already have done a lot to increase the
readability of the photo. The Auto Levels option will adjust the levels of your
image automatically, but it's not recommended that you use this feature unless
you're in a rush. It's better to control the image yourself.
Figure 8.21: The Levels Menu
Figure 8.22: Adjust the Triangular Controls to Alter Image Brightness
6594 LITW Chapter 8 9/12/02 3:54 PM Page 147
Image brightness and contrast can also be adjusted using the Curves menu,
which is accessed by right- clicking and choosing Image · Colors · Curves. In
some ways, Curves works like Levels but allows a different type of control over
image brightness and contrast. Drag the line up or down from the middle or
add one or more anchor points, and drag them around to tweak brightness,
color levels, and contrast. You can also adjust both levels and curves on individ-
ual color channels. If you look on the Channels tab in Layers & Channels, you'll
see that each color within your current color space has its own channel: R for
red, G for green, B for blue. You can gain a great deal of control over the image
color by manipulating levels or curves on individual color channels. Save the
Channels options for when you've acquired GIMP expertise.
N O T E
There is a setting for adjusting brightness and contrast on the Image menu, but no self-
respecting designer uses this feature much. Levels and Curves provide much finer control
over the image. As you can see, simply adding two anchor points to the curve line and
dragging them up and down slightly to form a gentle S shape makes the photo cleaner,
crisper, and easier to read.
Figure 8.23: The Curves Menu
Figure 8.24: Manipulating Brightness and Contrast with Curves
6594 LITW Chapter 8 9/12/02 3:54 PM Page 148
More on Graphics: The GIMP
Suppose we now want to remove some of the background clutter from the
photo. There's a person in the background who isn't adding anything to the
overall content of the photo (sorry, Gretchen!). We can use the free-hand selec-
tion tool (the little lasso) to select the background area and either delete or fill
it, but for this image let's use the finer controls of the Bezier selection tool to
separate the boys from the background.
T I P
For better results, you may want to use the Bezier tool at more than 100 percent
magnification, (right-click and choose View · Zoom In, or use the Magnify tool to
increase the view).
When you've worked your way around the chosen selection area, click the
first anchor point to turn the outline into a selection. Next, right-click and choose
Select · Invert to change the selection to include everything but the main figures.
Figure 8.25: Tracing around Eric S. Raymond with the Bezier Tool
Figure 8.26: Selecting the Background Area
6594 LITW Chapter 8 9/12/02 3:54 PM Page 149
Now let's create a motion blur on the background using the Blur filter.
Right- click and choose Filters · Blur · Motion blur. We've chosen a 45 - degree
angle and a blur of 37 pixels.
You may want to use the convolver tool to fix the edges between the
motion- blurred area and the main focus of the image.
Figure 8.27: The Blur Menu
Figure 8.28: Motion Blur Results
6594 LITW Chapter 8 9/12/02 3:54 PM Page 150
More on Graphics: The GIMP
Take some time to experiment with Filters. You'll find a full range of fun things
to try, from the aforementioned blurring options to edge detection, lighting
effects (oooh, Super Nova!), artistic "painterly" treatments, and more. Select
only a bit of your image to play with. Filters are resource-heavy, and it may take
an inordinate amount of time to render the entire image.
Script-Fu and You
With Script-Fu, multiple effects that you can use individually under Filters have
been cooked together into one script you can open or play with on an existing
image. The GIMP comes with some preset Script-Fu options, or you can down-
load others from http://www.gimp.org/ (this site also includes Script-Fu tutorials
worth checking out). Access Script-Fu from the Xtns menu or by right- clicking
the image and choosing Script-Fu. The former option provides access to precre-
ated images. These Script-Fu files don't apply to currently open images; they are
images supplied with The GIMP that you may use as is or as part of your own
creations. Script-Fu options from the right- click menu affect the current image
or a selected area within the image, allowing you to add cool special effects to
your own artwork.
Figure 8.29: A Preset Image Opened from Xtns · Script-Fu
6594 LITW Chapter 8 9/12/02 3:54 PM Page 151
Scanning from The GIMP
If the xscanimage plug- in has been added to your GIMP configuration, you can
access xscanimage directly from the Xtns menu by choosing Acquire Image. If
this option is not available to you, talk to your system administrator about
At this point, we've given you a small taste of what's possible with The GIMP.
As always, to learn more, try the tools, open the menus, and play with the results.
Remember to save your test image under a different filename. Then, if you hope-
lessly break your image, you can always go back to the original version.
Figure 8.30: A Script-Fu Effect Applied to Our Image
6594 LITW Chapter 8 9/12/02 3:54 PM Page 152