The Quick Start Guide to the GIMP, Part 2

This second article in the series introduces us to the basic features of the GIMP, a Linux power tool for the graphics artist.
Dialog Windows

Along with Image Windows, users will find that they interact repeatedly with various dialog windows. These windows open and close based on user input. For example, selecting New from the File menu in the Toolbox opens the dialog for creating a new Image Window. Most filters (features which manipulate all or part of an image) use dialogs to allow specifying parameters. Some dialogs require user action to close them; others are informational only and close automatically when they finish their work. An example of an informational dialog is the dialog box that shows the status of a filter operation. This dialog shows a scale that fills from left to right to represent the amount of the selected area that has been filtered.

There are a number of dialogs in the GIMP; a list of these dialogs is in the “Dialog Windows” box.

Dialog Windows


The GIMP uses a number of different cursors to identify what can be done in different portions of the image when using different tools. A cross-hair cursor is used by the Selection tools. This cursor is also used by the Color Picker, Bucket and Blend tools. A double-crosshair is used by the Crop tool. A pair of curved, point-to-tail arrows is used for the Transform tool. A two-pointed arrow (arrowheads on both ends) is used for the Flip tool. The Text tool uses the traditional I-beam cursor. The Move tool uses two two-pointed arrows, one pointing left/right and one pointing up/down. All other tools use a pencil cursor.

The cursor type also depends on whether a section of the image has been selected or not. For example, if a section of the image has been selected, and the cursor is placed over that selection then the cursor looks like the Move tool cursor. This is because the Selection tools permit a selected area to be moved without having to change tools to the Move tool. Note that only the selection moves—the non-selected region stays where it is. For many of the tools the cursor will be the traditional diagonal arrow over the image until the cursor is moved into a selected region. It takes a little work to become familiar with the currently active function based on the look of the cursor, but once you've worked with the GIMP for a short time they will become second nature to recognize.

Opening/Saving Files

Now that we've introduced the basic layout of the application we can start to look in depth. Beginning with file input and output, you have the option of starting with a blank new image or opening an existing image. In either case, you select the File pull-down menu from the Toolbox's menu bar. In this menu you'll find 5 options: New, Open, About..., Preferences and Quit. The About... option opens a little window that gives credit to the authors of various pieces of the GIMP. The Preferences option is used to set the visual cues used for transparent regions of images as well as the number of levels of undo. Keep in mind that setting higher levels of undo can use up significant amounts of memory. Changes to this setting are applicable to the current session only—they are not saved between GIMP sessions. There is an undo level option in the gimprc file, if you wish to make permanent changes. Finally, the Quit option does the obvious—it exits the program.

The New option opens a dialog that allows the user to select the dimensions of a new Image Window. The image type (RGB or grayscale) and the type of background to use are also selectable. Figure 3 shows the New Image dialog box. As with many options in the GIMP, you can also open a new window using keyboard accelerators. For a new Image Window, place the cursor over any GIMP window and type ctrl-N.

Opening an existing image is similar to opening a new Image Window. The dialog box presented is the File Selection dialog, which enables you to change directories and select individual files for opening. If you've ever used a Motif or Windows-based application, you will be familiar with the way the File Selection window is used. Like the New option, the Open option can be accessed through the keyboard. Place the cursor over any GIMP window and type ctrl-O to open an existing image.

Supported File Formats

In order to open an existing image, you must be familiar with the file formats supported by the GIMP. Raster images can be saved in a large variety of formats, each suitable for various functions. The GIMP supports all of the more popular formats such as GIF, JPEG and TIFF, and a few lesser-known formats. The GIMP Plug-In API, a programming interface allowing users to add extensions to the GIMP, enables the list of supported formats to be extended. All that is necessary is for a user to write a plug-in to handle the reading and writing of the new format.

The list of raster formats supported in the default distribution for reading and writing includes those shown in the “Raster Formats” box.

Raster Formats

PostScript output is used in conjunction with a Print Plug-In. This plug-in is not in my distribution, but it will most likely be part of the basic package by the time this article reaches the newsstand.

Four GIMP-specific formats are also supported—GBR, HEADER, PAT and XCF. GBR is the format used for brushes, so that you can create a simple image and save it as a new brush quite easily. The HEADER format is used internally for the buttons in the Toolbox. PAT files hold the patterns used for Bucket Fills and other fill operations. XCF is the format used to save layer information. While you are working on an image, you should periodically save it as an XCF image so that, if necessary, you can load it again in the future with all the layer information intact.

Saving images can be a little complicated. For example, if you try to save an image as a TIFF file you might find that only part of the image gets saved. When specifying any format other than XCF, the GIMP will save only the currently active layer unless you flatten or merge the visible layers of the image. If you save the image using the XCF format (even without first flattening or merging the layers), all of the layers will be saved. The moral here is simple—save your images frequently as XCF files, and you won't lose any data.

Some file formats are meaningful only with certain image formats. An RGB image contains more information about an image than the GIF format holds, so RGB images cannot be saved in the GIF format. If you wish to save the image as a GIF, the image must first be converted to an indexed format. To accomplish this, flatten the layers (done via the Image menu's layers->flatten option), click the right mouse button over the image to drop down the image menus and select image->indexed. The image is converted and is now ready to save as a GIF file. Note that converting from RGB to GIF means that some of the information in the original image may be lost, although the loss may not be visible. If you wish to enlarge or resize the image later, you should first save the flattened image as a TIFF file. Later you can convert it to an indexed image and re-save it as a GIF file. You might want to do this when working with web page graphics, for example.

Don't let all this confuse you. In short, start with these simple steps:

  1. Create your work of art in the GIMP.

  2. Save it as an XCF formatted file.

  3. Flatten the image.

  4. Save it as a TIFF formatted file.

  5. Convert the image to indexed format.

  6. Save it as a GIF formatted file.

At this point you have the original layers information in the XCF file, a full color, high quality image in the TIFF file and an image suitable for use on your web pages in the GIF file. Each of these file formats is a different size. The XCF is the largest; the GIF is the smallest. As you can see, working with images in this way tends to be very disk space intensive.