Mastering Gimp by Michael J. Hammel Introduction For the past year, the Gimp has been an item of fascination for many people. Unlike Linux, the Gimp is a tool specifically designed for end users, specifically designed for the desktop environment. While Linux itself still general lacks acceptance on the desktop, the Gimp has been firmly rooted there right from the start. There are a number of ways to learn about the Gimp's interface - the buttons, windows, and tools that provide the navigation and basic functionality of the Gimp. Printed documentation includes The GUM, a freely available document describing most of the basic features and many of the filters that come with the standard distributions of the Gimp. Several books have also been published commercially, including my own Artists' Guide to the Gimp. And Web sites, including the companion site to my book, TheGimp.com, are springing up around the Internet. Add to these the various mailing lists, hosted in many countries and covering many languages, and you've got a wide range of starter information from which to choose. What's missing, then, is not a generalized HOWTO for the Gimp. What's missing is a detailed description on how to use the Gimp to do specific graphic artists tasks. We all know how to use a rectangular selection. What we don't know is how to make a selection that accurately selects hair flowing in the wind. Or methods for creating 3D images using this primarily 2D tool. That's where this paper comes in. We're not out to learn the Gimp. We're out to master it. Gimp Basics The first step in mastering the Gimp is to learn what resources this application feeds on. As with any raster based graphics tool, the Gimp thrives in environments flooded with memory and disk space. A typical color image destined for a Web page might be 200 pixels wide and 40 pixels high. While working on this image, prior to converting to indexed format for saving as a GIF image, you might have 4 or more layers. If each layer is the height and width of the full resolution of the image then you could have a memory requirement of 400 x 200 x 4 x 3 = 960k. Although the flattened, saved GIF might be considerably smaller, while working on this image you can see that the memory requirement can be rather large. Add in requirements for multiple Undo's and this project's memory requirements start to grow rather quickly. Imagine, then, if you weren't working on a Web image, but on the cover for a CD. At 4 inches a side, with a printed resolution of 360 DPI, you're working on an image in the Gimp that is 4 * 360 = 1440 pixels per side. And trust me, you won't have just 4 layers in that project. Since the Gimp can chew up memory quickly, you need to understand where it chews it up and how you can make the most of what memory you do have. The Gimp adds system requirements for the following: 1. Large images - the larger the image, the more pixels 2. Layer previews - the more layers, the more previews, and the more memory. 3. Layer masks - each mask roughly doubles the amount of memory needed for a given layer. 4. Levels of Undo - Undo's simply save the changes you make to any layer, mask or channel. That includes filters, selections, and just about anything the Gimp can do. Imagine how much memory you need to have to save 10 levels of Undo where each operation saved was a resize from 1200 to 1000 pixels! 5. Color RGB images take up more memory than grayscale or indexed. There two basic destinations for Gimp images: the Web and print (including film). If you plan on working on images destined for print, then working with anything less than 64Mb of memory is simply going to be slow - there is no way around that. You can limit memory requirements a little by turning off the Layer previews using the Preferences dialog or cutting down on your levels of Undo. But 64Mb just doesn't go far on a multitasking system when running an application like the Gimp. If you're stuck with less than 64Mb, try exiting all other applications. The more applications that are running then the more memory they'll require, and Linux will shove the Gimp out to swap space if it needs to run something else for a little while. If you absolutely must run another application in such a limited space, try setting it's "nice" level to something high, say around 15. This gives the Gimp a little more time on the CPU to do it's work. Now, let's say you've got a ton of memory: 256Mb or more. That's not too bad, but it can still be pretty limited with large images using the default tile size configuration for the Gimp. See, the Gimp divides up images (and layers) into what are called "tiles". The Gimp wants to work on tiles completely in memory. So when a pixel needs to be updated in a tile that isn't in memory, it swaps what's in memory to disk files, known as swap files (although these are different than Linux's swap files). The default tile size is about 10Mb. That's plenty large for Web images, but for really large images on systems with lots of physical memory, you're actually slowing yourself down by forcing lots of swapping between memory and disk. Remember: any time you need to read or write to disk you're doing something much slower than working directly in memory. The way around this? Just increase the tile size in the Environment Page of the Preferences dialog. Tips for faster Gimp'ing 1. Experiment with low resolution images first, then reproduce the steps on the larger resolution image. Design a final high resolution print version by first creating it at a low, 72 DPI resolution. It's like building a model of your house before you build the actual house. Work out the problems on the low end first. 2. Close high resolution images while experimenting with low resolution ones. 3. Save low resolution, layered images of effects you think you might use later. When you go back to them you won't have to open the larger, final version just to see what you were doing. 4. Use base images - generate an image from multiple layers, save it, flatten it, then cut/paste it into another project as a single layer. Close the previous base image. You can always go back to it later to make changes. 5. Get a fast CPU. 6. Get very fast hard disks. IDE's are generally fast and getting better all the time. SCSI disks are often even faster. Check the manufacturers rating. 7. Never specify your swap file directory as a directory on a network mounted file system! Your swap file directory should be on your local hard disk (or local to whatever machine Gimp is actually running on). And things to know that won't help 1. Ignore what "top" tells you - it may look like you've used up all 256Mb even after the Gimp has exited. But Linux caches information about applications to speed their start up later. After Gimp exits, the memory it was using can safely be used by other applications. 2. 3D hardware acceleration does nothing for the Gimp. Gimp is a 2D tool, even if it can produce some 3D effects. The only thing fast 3D cards can do is to speed up 2D rendering processes - ie very fast screen drawing of primitive shapes. But most of the Gimp's image display algorithms are CPU intensive, not video card intensive. So faster CPU's are the answer. Get a cheap card with full color (known as 16.7 million or TrueColor cards) at full resolution (whatever the maximum your display will support). 3. Get a nice monitor. When you reach 80, your eyes will thank you. So will the cat you just missed with your car. Font Techniques A big question from new users of the Gimp is how to deal with fonts. The Text Tool sees only the fonts your X sever knows about, so you don't specifically configure fonts for use with the Gimp - you configure them to work with the X Window System as a whole. First, a quick primer on the X Window System. The graphical user interface for Linux systems uses a client/server technology known as the X Window System, often just referred to as X. The server is the device driver - it knows how to talk to your graphics card and monitor. The clients are X programs, like the Gimp. The clients decide what to draw, the server decides how to draw it. Now when clients request fonts to be drawn they usually request them by a name, the X Logical Font Description. That's that long strange looking string you see in some X programs that looks like this: -unknown-aachen-bold-r-normal-*-*-140-*-*-p-*-iso8859-1 Normally the X server then reads the font information for this font and draws it on the screen. With the Gimp, the font information is passed back to the program so that the letters can be converted from their descriptions into rendered images. For the X server to pass this information back, it needs to be able to understand the descriptive language the font is written in. By default, the X servers on Linux understand Adobe Type 1 fonts. They don't know about TrueType fonts, so you have to run a special program, called a font server, to help them get information about TrueType fonts. Now, how do you add fonts? It's rather simple, once you know all the bits and pieces. To add Type 1 fonts, you simply copy them to a directory and run the Type1Inst script to build a couple of files the X server needs. Then run % xset +fp This adds the new directory to the front of the search path for fonts. If you add a font with the same name as another font already installed, and you run this command like shown, then the new font will be used from now on. To add a TrueType font you need to install a font server. I use the xfstt server. It's another freebie and works well with my Xi Graphics Accelerated X server. Installation instructions come with the program and explain how to tell it where to find the TrueType fonts on your disk. Once installed, you then run % xset fp+ unix/:7101 This tells the X server that a font server is running on port 7101 on the local system. The X server will then query this server for any font information the X server can't find in the rest of the font search path. Note that the command uses "fp+" this time. Putting the "+" after the "fp" means to append the new path (in this case unix/:7101) to the font search path. With the "+" in front of "fp", the new path is prepended. Font Tools Now we get into the real meat of the Gimp. Since we just talked about fonts, let's continue down that road at a little higher level. The Gimp comes with a Text Tool in the Toolbox. This tool is useful for adding short blurbs to images but lacks the ability to do multiline text, among other things. In the 1.0 version of the Gimp, you can add the GDynText plug-in to get a more feature rich text tool. This plug-in comes standard in the 1.1.x developers releases. GDynText can be found as in the Image Window menu under "Filters->Render->Dynamic Text". It allows setting the color, line spacing, justification, and rotation of text. Where the stock Text Tool in Gimp 1.0 allows you to specify a border around the text to account for slant, ascent and descent properties in the font, GDynText already takes these into account and buffer space around the text area with enough space to allow all characters to properly be displayed. The Text Tool in the 1.1.x developers releases has changed a little from the 1.0 release and now offers the ability to find a font using font characteristics, much like GDynText. Also in the 1.1.x releases, the need for the border has been removed from the stock Text Tool. It now handles font extents correctly. However, multiline text is still not available, so you'll probably end up using GDynText just as much as you do with the 1.0 release. Quick 3D Text The Gimp doesn't have a tool for extruding text (at least not yet), so in place of that you can use this little trick to simulate depth to your text. It takes all of 5 minutes to do, unless you're producing really big text. First you need some basic text. This trick only works if your original text is in some color other than black (or the text color and the shadow we're about to make are different colors). I've created some simple text using the Futura Poster font, sheared it and added a little perspective to it. Add a bit of a border around to the text too, say about 1/2 the font height, using the resize layer menu option. Next we want to duplicate the text layer. Select the entire original layer and fill it with black (make sure Keep Transparency is turned on for that layer). Turn off the selection (Shift-Ctrl-A). Turn off Keep Transparency and motion blur the original layer using the copy layer as a guide for the angle of the blur. The length shouldn't be too long - you don't want really deep 3D extrusion or else it won't look quite right. I used an angle of about 130 degrees here, and a length of about 20 pixels. You should use a Linear type blur, too. Note that if you don't have enough border and/or you use too long a blur length, the blur will get chopped off at the edge of the layer. Merge the original (now blurred) layer with the background. You must do this or the next step won't work right. To make the blurred region appear solid, use the Levels dialog and drag the black and gray handles in the upper adjustment bar to the right. This will make most of the pixels extremely black. If you drag the black handle all the way to the right the edges of the text become jagged, so you may want to leave it about half way over. The gray handle can go all the way to the right. And that's all there is to it. Standard Logos The Gimp comes with many standard logo scripts, both in the 1.0 and the 1.1.x developers releases. These are usually rather easy to use, requiring only that you specify the font by common name (such as Lucida or Helvettica), size, and color and provide some text for the logo. Since all of the logos provided are Script-Fu scripts it is possible for you to edit these for your own purposes without having to recompile anything. Tips for using Fonts 1. TrueType fonts scale better than bitmap fonts, so if you need really large print you will want to get a TrueType font server. However, it has been reported that there are limitations to how large fonts can be scaled with some of the font servers. You may need to render the fonts at one size, and then scale the rendered text layer in order to get the text as large as you need it. 2. Most of the really good fonts you can download from the net are TrueType fonts. You can get some Type 1 fonts, but in general I've found the best ones are TrueType. 3. GDynText allows you to edit the text after it's been rendered. The Text Tool will not. If think you'll need to change the text later, use GDynText. 4. Neither text tool allows you to specify the kerning - the space between letters - although GDynText does allow for adding space between lines. You'll have to use character spaces (ie hit the space bar on the keyboard) to add spacing between the lettering. 5. GDynText's rotation option rotates the bounding box of the text as a whole, so the entire text rotates the specified amount. If you need text to bend around a curve, you'll need to look at the Text Circle Script-Fu script: Xtns->Script-Fu->Logos->Text Circle Selections and Masks Regular selections can be hard to work with on complex shapes. You can use keyboard modifiers to add and subtract from selections, but often this is still too much work to isolate an odd shaped feature in an image. There are a couple of tricks to making these types of selections easier. The first of these tricks is the simplest - use the Select by Color option from the Select submenu of the Image Window menu. This handy selection tool does not have an icon in the Toolbox so is often overlooked. It will select regions that fall within the specified threshold of the pixel upon which you click in the image. All pixels that match the search criteria given in the Select by Color dialog will be selected. This differes slightly from the more commonly used Fuzzy Select tool in the Toolbox. With the Fuzzy Select, only pixels that fall within the threshold *and* which are adjacent to another pixel that falls within the threshold are selected. Combinations of Select by Color and Fuzzy Select can help isolate odd shaped regions fairly quickly. When using the Fuzzy Select and Select by Color, you can limit the search region by first creating a rectangular, oval or freehand selection. Using the Freehand Selection you can first draw a rough outline around the region, then use the Select by Color option to isolate the remaining region between the Freehand Selection and the area of real interest. Another trick is to use a destaruated and contrast enhanced version of your image to isolate regions. By desaturating the image you deal only with brightness levels and by contrast enhancing you increase the variation between nearby pixels. You can then return to the use of the Fuzzy Select or Select by Color to build a selection. Once you have a desaturated and contrast enhanced version of your image, you can use this as a mask. Just copy and paste it into a mask for the original color layer. You may need to invert the mask to isolate the regions you were really trying to isolate. By using a mask, you don't do anything destructive to the image. Blend and Layer Magic Working with layers is key to any Gimp project. I'm going to use my own terminology here. An image is a single picture which may include multiple layers but exists within a single XCF formatted file. A project is a set of one or more XCF files used to generate a final, flattened image. The distinction is important when working on a project. You need to be able to design the project based on sections of the image which are distinct and which may or may not overlap within the final image. By reducing the final image to these smaller sections you increase the performance you can squeeze out of a lower end system because you only work on the final version using very few layers and all preliminary sections are considerably smaller in width and height. So you've broken your project into smaller, more manageable pieces. That's a good plan. The next thing is to think about your ability to make changes easily. Without a doubt, some client will at some point ask you to make some minor change long after you thought you were done with the project. It happened to me while working on the Linux Journal August 1999 issue. I was able to make the changes fairly easily because of three things I did in my design: I sectionalized the final image, I saved the XCF versions of the individual sections, and I used layer masks and layer blend modes instead of making actual changes to pixels in the image. That last item, using layer masks and layer blend modes, might seem a little strange as being all that important. But let's talk about why it is. If you make changes to a layers image content - the actual RGB or Grayscale pixels in that layer - and then you save the file and exit the program, you've lost the original contents of those pixels. If, instead, you use combinations of layer masks and layer blend modes to achieve the same effect, you don't lose the original images content. So returning at some later date will get you the original pixels. Also consider this: changes made using layer blend modes don't take up any extra resources. You don't need to use up any levels of undo with layer blend modes since these modes don't actually change the pixels, they just change the way those pixels are displayed. And changes made with layer masks don't remove any pixels permanently. If you need to change the position of a layer later, and need to readjust the transparent region for that layer because of this move, you can do so by updating the layer mask. If you had applied the mask or simply erased the pixels originally, you wouldn't be able to make such changes at a later date. You'll find that even though there are 14 layer blend modes (15 in the 1.1.x developers releases), you will probably be using only a few them very often. Here are the modes, what they do, and how often you might expect to use them (skipping the Normal mode, since it doesn't change the image display): Screen, Multiply and Overlay Screen and Multiply are also known as Dodge and Burn. To dodge a photograph is to ligthen it, whereas to Burn a photograph is to darekn it. Setting a layer to Screen mode will cause it to light the image layers below it. Alternatively, a layer set to Multiply will darken the image layers below it. Overlay is a sort of combination of the two. The overall effect can be to either lighten or darken the lower layers, but it also intesifies the the colors. In Screen mode, black in a layer is neutral - it has no effect on the displayed image. In Multiply mode white is neutral. In Overlay mode, 50% gray is is neutral. You'll find yourself using Screen and Multiply fairly often to bring out highlights or sharpen images. Overlay is often used when both Screen and Multiply cause too dramatic of an effect. It also is used in conjunction with Embossing to enhance 3D effects. Difference vs Subtract The next most commonly used, Difference and Subtract are used for special effects. The two modes are nearly identical except that with Difference, negative values are given their absolute values whereas Subtract is clamped to a low value of 0 (black). Difference can be used to generate interesting 3D effects with unexpected color variations. Subtract can product 3D effects as well, but the colors are less funky. Darken, Lighten These modes take the pixels in the current layer and compare them to the layers below. If they are darker (for Darken) or lighter (for Lighten) then the pixels in the current layer are used, otherwise pixels in the lower layers are used. These modes are not used all that often, as there are better ways (Curves, Levels) of managing an images brightness. Color, Hue, Saturation and Value Each of these work in HSV mode, so the current layer is converted to HSV prior to testing it against the lower layers. In the cases of Hue, Saturation and Value, only one channel from the HSV layer is compared against the lower layers. With Color, both the Hue and Saturation are used, with the effect being to leave only the lightness of the lower layer pixels in tact. Seldom used, these modes can be used for special effects or for isolating regions of an image to be used as a selection or layer mask. Dissolve Dissolve is a bit like adding noise to a layer, with the amount of noise being determined by the layers opacity. The lower the opacity, the more noise. The spots of noise are actualy transparent regions. Dissolve is almost never used. Tips for Layers and Blends 1. Keep destructive changes to a minimum. If you need to remove pixels from a layer - use a layer mask. If you need to adjust the colors for a layer, add a solid colored layer and use a blend mode. 2. Remember that Layer previews, those small thumbnail sized images in the Layers and Channels dialog, take up memory. If you have lots of layers but little memory, you can improve the performance of the Gimp by turning off the Previews in the Preferences dialog. 3. Color fills can be used with layer transparency enabled to fill all of the non-transparent pixels in a layer without having to use a selection. This is important because Alpha To Selection, which is often used to select all of the non-transparent pixels in a layer, only selects pixels that are equal to or more than 50% opaque. You'll miss some pixels if you try to fill that selection. 4. The Layer blend modes Screen, Multiply and Overlay are you friends. Learn to love them. Web Imaging Web images are to the Gimp what hamburgers are to McDonalds. The vast majority of users are using the Gimp to produce images for Web content. Part of the reason is that the Gimp simply doesn't provide the right tools to make it easy to produce images for print media. But a better reason is that the Gimp *does* provide the right tools for images for the Web. One of the biggest issues for Web based images is color - there are still a lot of people using browsers on color limited systems. Fortunately, the tools for mapping your RGB images into low color images are easy to use and rather flexible. The first is the indexed color format itself. When converting from an RGB image into an Indexed Color image you are given the opportunity to chose to map your images into a Web optimized palette (ie the Netscape color cube) or any one of a number of other palettes. The palettes themselves can be edited using the Indexed Palette dialog in the Gimp. GIF images are indexed color images with a maximum of 256 different colors. Most people map their images down not just to fit into those 256 colors, but into the 216 specific colors defined by the Netscape color cube. This cube is designed to provide optimal color resolution when used in a Netscape browser. The other 40 colors are left for use by other programs. The problem with GIF images is they don't compress as well as the other popular Web image format - JPEG. However, these two types of images are not meant for the same types of images. The GIF format is good for handling images which contain text - things like screenshots of program windows, for example. JPEG is good for maintaining color quality in photos. In this case the images still look good even when compressed because we're not looking for the distinct edges of letters. JPEG images compress more, in general, than GIF images. You need to know what format you're trying to use and whether large images are tolerable to your viewers. One way of speeding the display of your page is to use low resolution images. You can specify these with the LOWSRC= tag in your HTML. These are loaded and display first while the higher resolution images are being downloaded. To create a low resolution image, desaturate your image and increase the contrast. You can also use either the Levels or Curves dialog for this, but in this particular case the Brigthness/Contrast dialog is simpler to use. What you're doing is reducing the range of values that the image has to contain, thereby increasing the amount of compression that is possible. Using GIF images as LOWSRC images might not increase download times due to the way GIF does it's compression. JPEG images are better for LOWSRC images since you aren't really trying to display the image in it's entirety - just enough to give some clue as to what the image is going to be, while at the same time providing a very low bandwidth download of the image. One effect used rather often these days are gradients. A gradient is simply a smooth flowing change between two colors. The problem with using gradients on the Web is that they use a lot of colors. JPEG images will probably hold the gradient without loss of quality but you may not got as much compression as you'd like. GIF images will definitely loose the quality of the gradient. In fact, you're likely to get what is known as "banding" - the streaks of color that run linearly across the image perpendicular to the direction of the gradient. In order to allow better compression and remove banding, you can use a simple trick to maintain the gradient's quality: add grayscale noise to it. The noise adds grain to the gradient in RGB mode and makes it look bad, but when used in the GIF image it breaks up the banding and allows the gradient to appear fairly smooth. With JPEG images you may even get better compression ratios without loss of image quality. Tips for Web Imaging 1. Use the right image format for the job: GIF for images which contain text and JPEG for photo quality, high compression ratios. 2. Add noise to gradients before saving to GIF or JPEG. 3. Use desaturated, high contrast LOWSRC copies of the final image. 4. Use the Netscape color cube. If you want to maintain a particular color scheme, map your images first to your particular 256 color palette, then switch back to RGB mode and back to indexed again using the WWW optimized palette. Onion Skinning Layers and Animation tips I have to admit that I'm not anywhere near being an expert on animations. I've only created a few simple ones, certainly nothing worth showing in public. But there are a few things I know that might be helpful. The Gimp's Layers feature is very handy for doing "onion skinning" - a process where you look at previous and future frames of the animation at the same time. Since layer visibility can be turned on and off, and layers do not have to be the full size of an image window, you can use each layer as a frame within an animation. By viewing all of the frames at once you can get an idea of how the animation will flow from start to finish. You can also change the opacity of various layers, so you can see lower layers more clearly. Just be sure to reset the opacity setting before generating your animation! Now, most animations have far more frames than you would want in a single image file. A full animation project, then, would consist of a series of image files, each with a series of frames as layers. You can then take each of the image files and merge them together using the Gimp Animation Plug-In, known less formally as GAP. GAP is actually a set of plug-ins that perform various animation specific handling on one or more XCF files. GAP provides a fairly extensive animation facility that includes the ability to generate MPEG animations. For simple Web based animations you can manage a single, layered XCF file to produce the animation. Each layer of the animation is a separate frame, with the layer name containing the time (in milliseconds) that each frame is to be displayed and the type of disposition for the frame (leave in place, replace, and so forth). After converting to indexed format, you can save to a GIF file. When you do this you will be given the opportunity to save the layered XCF file as a GIF animation. Pretty simple, really. Image Enhancement and Touch Up Scanning is a common part of image work done with the Gimp. However, images obtained in this way often need a bit of work. Photos can have scratches or dust on them, scans are often out of focus, and nearly all images require some color correction. The first step after scanning is usually to color correct. The best place to start is with trying the Auto-Levels feature of the Levels dialog. Since scans can be rather large, waiting for Auto-Levels to complete can be a pain, so test it's affect first by running it in a rectangular selection. If the affect appears to improve the image a bit, hit Ctrl-Z to undo the Auto-Levels, Ctrl-Shift-A to remove the selection and then apply Auto-Levels to the whole image. Auto-Levels will probabaly work well for a good 80% of your scans. For the rest of the images, adjustments of the range sliders in the Levels dialog will help. Optimally, you would like the histogram in the Levels dialog to run completely across the available range. This would mean the black pixels are completely black and the white pixels are completely white. The tonal range of the image is as rich as it ought to be when the histogram runs across the full range. The adjustments you make to Auto-Levels are not your final color adjustments. They are just to stretch the tonal range. If you peform the cloning before applying Auto-Levels then the cloned regions may become obvious when the latter color adjustment is performed. The next step after initial color adjustment is to sharpen the scan. Most desktop scanners provide moderately sharp scans these days, but there is no accounting for the quality of the glass plate on which your image is set. The best way to adjust the the focus is to run the image through the Unsharp Mask filter, found as Script-Fu->Alchemy->Unsharp Mask in the Image Window menu. This script will produce a second Image Window with multiple layers. Be sure to flatten that new image and work from it from then on. You might wonder why I don't recommend the Sharpen Filter instead. This filter works on the current image and doesn't produce any extra layers. However, aside from a more crude algorithm for sharpening, it also has a nasty side effect of incorrectly coloring the top and bottom most row of pixels in a layer. This effect doesn't occur on layers with transparent rows at the top and bottom of the layer, but for scans you'll always have non-transparent rows there. You're better off using Unsharp Mask. After this initial color adjustment, you start to look at image blemishes. Removing spots and scratches is fairly easy using the Clone Tool. The trick is to use multiple source points and to use an opacity of less than 100%. If you click on a source point and then just start painting with 100% opacity your simply copying one part of the image to another location. In most cases this sort of copying can be rather obvious. By changing the source point multiple times to cover the spot or scratch you remove the mirrored appearance a single source point would provide. Another tip for cloning is to use a brush with soft edges. The Clone tool works more like the Paintbrush than the Pencil - it will honor the partial opacity of soft edged brushes. Using the same brush with convolve after the cloning has been done can help to blend the nearby pixels more smoothly with the newly cloned region. Again, using an opacity of less than 100% will soften the effects of the blur from the Convolve Tool. Curves and Level adjustments can now be made to enhance the image further. At this point, you can use the Curves dialog on a desaturated copy of an image to help bring out the details in shadowed filled regions. Remember that even though a region may appear very dark visually, it may still contain enough information to display details if properly adjusted. A desaturated copy of the original image, placed in a layer with it's mode set to Screen and it's contrast adjusted with the Curves dialog can really bring out those details. Similar tricks can be done using the Levels dialog. When adjusting the brightness and contrast in an layer you'll get finer control using the Curves and Levels dialogs than you will with the Brightness/Contrast dialog. The latter is better for generating harsher levels of contrast, often required by layer masks to isolate specific regions of an image. Tips for Image Enhancement 1. Use soft edged brushes set to less than 100% opacity when cloning and convolving. 2. Always run Auto-Levels (or adjust the levels manually) followed by Unsharp Mask on your scans before doing any other work. These changes might not really improve the scan, but odds are good that they will. 3. Use Unsharp Mask instead of the Sharpen filter on a new scan. Sharpen should only be used on single layers, not entire images. 4. Curves and Levels offer finer granularity in adjusting the brightness and contrast in an image than the Brightness/Contrast dialog. Brightness/Contrast is best used when trying to generate masks. Drawing Even the best tools have their limitations. The Gimp is a raster graphics tool, not a vector tool. What that means in layman's terms is that it doesn't deal with line drawings very well. There are a couple of options available to make line drawing tasks a little easier from within the Gimp, and a few others for dealing with the topic outside of the Gimp. Although you can draw some fairly primitive shapes (ovals, rectangles, even polygons) using nothing more than a decent selection, a brush with 0 spacing and the Edit->Stroke Image Window menu option, a better tool for the job within the Gimp is the GFig plug-in. This tool is vector based, allowing you to specify primitive shapes using control points at vertices, centers and radii. These control points can be edited and deleted. You can even specify the brushes to use when rendering to a new layer. GFig is a fairly decent tool for drawing, but it's interface is a bit clunky and hard to deal with and it doesn't really scale well for print sized images. In the 1.2 version of the Gimp a new feature called Paths has been added. A path is an outline (not necessarily a closed shape) which is to be stroked to perform line drawings. So far I've found this feature a better solution to stroking selections, but the implementation forces you to create many layers for a single drawing, each with a single path. I'd rather do many paths on a single layer. Another drawing tool which you might consider is Sketch. This is a python based program that aims at being a tool similar to Adobe Illustrator. It will, the author claims, even read in Illustrator files. The tool allows you quite a bit of freedom to draw, from defined primitive shapes to bezier curves which can be placed on multiple layers. I've found this a great tool to sketch outlines of images, save them as EPS files and then import them into the Gimp for colorizing. Similarly, I can scan with the Gimp, export to EPS and import to Sketch to do my outlining. The trick here is simply to use the right tool for the job. The Gimp really isn't the right tool to deal with line drawings. Effects Filters An effects filter is one that modifies the existing pixels in an image or layer. Many of these filters can work on new layers, but most work directly on the current layer. Their effects can usually be undone with a single Undo operation, but be careful. They don't all behave that well. There are literally dozens of effects filters that come with the standard Gimp distributions. This paper couldn't possibly do them all justice, so I'll just take a peek at a few of the oft used ones. Blur A good blur often follows a good drink, but with the Gimp a good blur often preceeds visual enhancement. Blurring can be used for special effects - the Motion Blur is a visual effect in and of itself. But a blur is most valuable when used to sweep away distinct edges in a mask, making the effect a layer has on an image merge more seamlessly. I find I blur masks far more often than I blur the image in a layer. Oilify and GIMPressionist Artistically the most recognizable visual effect of all Gimp plug-ins, oilify and GIMPressionist offer effects that turn ordinary scans into painted objects, using styles that even the least artitistically trained among us could recgonize. GIMPressionist is not included in the standard distributions but should be a part of every Gimp artists tool chest. IWarp Just how do you turn an ordinary, bald headed man into an alien? You use IWarp. Although it takes a little practice - and someone to explain that the preview window is used to apply the current settings - IWarp is the best of the best when it comes to image distortion. Although many of my more dramatic images use Curtain and Conical Anamorphose to generate unusual backgrounds, IWarp is the tool to use to modify easily recognizable shapes and still leave them at least partially recongizable. Emboss vs Bump Map It's simple - Emboss works on images without an alpha channel, Bump Map works on any image. Bump Map has an Emboss option. Therefore, why would you use Emboss? You wouldn't. It's simple. Ripple How do you add a 3D wave to an image - say a piece of paper floating in the breeze? You start with the Ripple filter. By setting the period long enough, in proportion to the size of the object to be rippled, you generate half of the 3D effect. The other half comes from a good drop shadow. If the object is lit from the proper angle, then the drop shadow will look much like the rippled object. If the angle comes from nearly perpendicular to the face of the object, then the drop shadow will have a much less defined ripple. Determine first the direction of the lighting. Then you decide if the drop shadow will have the same or less (or more) of a ripple than the object. If its the same, then ripple the object first and then apply the Script-Fu->Shadow->Drop Shadow filter. If the shadow will have less ripple, you need to apply the drop shadow first, then ripple the oject and shadow separately. Important: make sure you add some space around the object and shadow for the ripple to be applied to! You may need to resize the layer of each prior to applying the ripple effect. One thing to note about the Ripple filter: it doesn't deal with really large images very well. In the August 1999 issue of the Linux Journal I rippled a long piece of film. In order to set an appropriate period I had to modify the ripple source code. But if you understand GTK programming at all, it's a very minor fix. In fact, I can explain it to you, if you just ask nicely. Rendering Filters Where effects filters change the substance of existing pixels in an image, rendering filters create new pixels without (or with little) regard for any existing pixels. These filters are some of my personal favorites in the Gimp. Solid Noise - as basis for many other effects Sky's with clouds, star fields, bumpy textures. These can all be created by starting with a solid noise rendered layer. By applying variations on Brightness and Contrast, layer masks, and even noise, you can generate some very interesting backdrops for you images. Noisify - to prevent banding in gradients Speaking of noise, this simple filter is the master of the low color gradient world. With a little noise scattered through a gradient you can break up possible banding problems. But this filter goes way beyond this. With a good noisy background, blurred, contrast adjusted and embossed you can create all sorts of random textures. It's great for generating stone, gravel, and concrete as well as bark. There are sample patterns like these on TheGimp.com Web site that were generated starting with a noisified background. GFlare vs FlareFX The standard lens flare plug-in for the Gimp is FlareFX. This is a fairly simple tool and does a decent job of adding a quick lens flare to an image. But a much better tool for this job is GFlare, which is available from the Plug-in Registry. GFlare allows you to rotate and stretch the angle of the flares, the radius and rotation of flares, the number of type of rays and flares, the gradients to use to color the flares, and so forth. It's a far more sophisticated plug-in than the standard FlareFX. The only problem with GFlare is that it doesn't seem to be available anymore on the Internet. I couldn't find the author's web site. So I'll put a copy of it on TheGimp.com, because I find it a much better lens flare tool than the stock FlareFX. Flame and QBist There are two very interesting plug-ins that generate random patterns using a common theme: Flame and QBist. Flame produces flittering whisps of colored light that can resemble a flame but can also resemble lots of other whispy things. The effect is not unlike some of the images that can be produced by IFSCompose (another very interesting tool for generating fairly random patterns), but the use of gradients makes Flame a little more intersting. QBist builds random images that have a fairly smooth flow to them and are more full bodied than the tendriled visions that come from Flame. Both of these plug-ins work on the idea that from a central form 8 other versions of the form can be built. You pick one of the 9 displayed forms (including the original) and 8 more are generated. Flame offers more control over the size, shape and color of the generated forms. QBist is fairly random - you don't really provide any input to the process other than picking the next seed form. Both allow you to save seed forms and reload them later. Flame saves more than just the seed information, so you can edit the parameters of the seed when you reload it later. Flame makes use of a colormap for its coloration. The colormap can be specified using a menu option and can be one of a number of canned options, a custom gradient or a background image. I've Flame in a number of places, the most obvious being on the title page of my personal Web site - www.graphics-muse.org. QBist I just like to play with to genarate interesting backgrounds. QBist does a better job of automatically scaling the form to fit your image area. Flame requires user input to handle the scaling. Master Status The Gimp has been a real joy for me. I've been able to learn quite a bit about computer graphics from a technical standpoint because of it. But there is more to the Gimp than just learning the Plug-in API. Using and combining the filters available for the Gimp is an art, one that doesn't follow any style guidelines or defined standards. Mastering the Gimp requires both an understanding of the technical and an openness to the visual. You have to be willing to experiment, learn how to plan your projects, and understand how to move both forward and backward in your designs. It takes some time, some patience, and some luck. But it is a process that is well worth the effort. ---------------------------------------------------------------- Online Resources: The Gimp - http://www.gimp.org Type1Inst - http://goblet.anu.edu.au/~m9305357/type1inst.html xfstt - ftp://metalab.unc.edu/pub/Linux/X11/fonts/ Gimp Animation Plug-in Tutorial: http://pages.hotbot.com/arts/hof/index.html Sketch - http://www.online.de/home/sketch/Default.htm TheGimp.com - http://www.thegimp.com -- Michael J. Hammel | I love deadlines. I especially love the The Graphics Muse | swooshing sound they make as they go flying by. mjhammel@graphics-muse.org | -- Dilbert http://www.graphics-muse.org