The Graphics Lab on Your Linux Desktop

By: Michael Hall
Tuesday, August 1, 2000 08:45:56 AM EST
URL: http://www.linuxplanet.com/linuxplanet/reports/2131/1/

A Wealth of Graphics Tools

I hate taking pictures with film. You'd think, despite several years of practice, and even some time spent as an acolyte in various darkrooms where I learned to mix chemicals just so and mastered the arcana of dodging and burning under an enlarger, that I'd be singing the praises of the analog development process.

No way.

I want to be able to look at pictures I've taken the moment I'm back from wherever I took them. I want to be able to play with them without worrying about either printing up a second set or having to pay for three or four prints in case my collages don't work out right the first time. I want to be able to manipulate and work the images I take until they suit me if I didn't get the shot quite right.

I was waiting for digital photography when it came along, and I embrace it with open arms. It's the perfect combination of instant feedback, manipulatable results, and the joy of picture taking. It's also a hobby that's well-supported under Linux: there's a digital photolab sitting on your desk, even if you've sworn off Windows.

This is a look at a set of GNOME/GTK programs that all work together to give you the tools you need to produce great web graphics, enhance your photos, and explore your creative side. If you just want to get the red-eye out of photos before putting them up on your web page, or if you feel like making elaborate photo-collages, these tools start with the basic act of getting your digital camera to talk to your PC, and end with making simple slideshows of the finished product.

gPhoto
The first step to getting an image into your computer is to get your computer to talk to your camera. That's where gPhoto (currently at version 0.4.3) comes in. gPhoto offers a collection of well over 100 drivers for digital cameras of all sorts. At this point, the bulk of the support is for standard serial connections, but if you're willing to work with the developer's version and spend a little time learning enough about CVS to grab the very latest work, there's also some support for USB-connected devices. gPhoto is available as part of the Helix Code GNOME distribution, or you can download a variety of binary packages (including some for various BSD distributions), source archives, or read about using CVS from the project download page.

gPhoto has a fairly clean design, and it's very easy to configure your camera. (The process is shown at the right.) You should know which serial port your camera is connected to, keeping in mind, as usual, that Linux serial ports are numbered starting from '0': COM1 under Windows is ttyS0 under Linux, COM2 is ttyS1, and so on.

Once you're sure of which port your camera is connected to, selecting gPhoto's "Configure" menu will allow you to select your camera model, the port it's connected to, and (depending on model) configure a few other items as well. On my Canon PowerShot S-10, I was able to synchronize the time between my PC and camera and browse the files stored on the camera's compact flash card. Even more importantly, the setup screen allows you to set the speed at which your camera talks to your computer. Failure to set this within gPhoto itself will mean excruciatingly long download times. Set this value to 115,200: if your camera or computer need to step down to a lower speed for whatever reason, they'll still select the best speed possible, which is better than the default 9600.

There are several ways to grab photos from your camera using gPhoto. It offers the opporunity to download thumbnail images (also shown at right), which allow you a small preview before deciding to download an entire image, or you can opt to download a simple, picture-free index. Either way, when you do choose to finally download the complete images, you can either save them directly to disk after assigning them a filename prefix (which is handy for separating the results of multiple photo sessions) or you can load them into tabbed windows within gPhoto.

If you choose to open the images within gPhoto itself, you can do a little pre-processing work before saving them to disk. gPhoto offers a few simple tools for basic color correction, image scaling, and rotating or flipping. You can use these to clean up pictures you don't plan to do much else with if you don't want to bother with loading the GIMP, but they don't offer an exceptional amount of features: just enough to tidy things up, or decide if you need to head back out to reshoot something that might be beyond digital salvage.

There are a few caveats when it comes to using gPhoto. The program is still under development, and there are a few rough spots. Sometimes, if you know your camera is connected properly and have no reason to doubt your system configuration, but it seems like nothing's talking to anything else, closing gPhoto and restarting both the program and your camera usually fixes things. Nothing gets lost, and it seems to cure most problems. There's also sometimes a slight disconnect between what your camera thinks an image is called, and what gPhoto will label it. It pays to wait a few seconds and dowload the thumbnails before queuing up which images you want to save to disk.

It's also useful to pay a visit to Google. Many digital cameras have the same basic architecture, despite differences in brand names or model numbers. If a camera isn't listed as supported by gPhoto, there's a good chance it's closely related enough to a supported model that you'll still be able to get camera and software to talk.

gPhoto offers a very friendly and easy-to-use package that covers a wide array of cameras. When I was shopping for a camera, I loaded the supported list of cameras on to my Palm and went shopping. I was pleasantly surprised to notice that there was support for almost every model on the shelves of several local merchants. The only exception was a $75 toy. Everything else, from $200 beginner models to pricier almost-$1000 units were supported by gPhoto.

The GIMP

The GNU Image Manipulation Program (The GIMP) is considered one of the best examples of open source development around, especially where desktop applications are concerned. It's stable, versatile, extensible, and feature-packed. A lot of sites in the Linux community owe their graphical flair to the GIMP, and it's proven to be a killer app for many: it offers a level of functionality comparable to Photoshop for free. (A screenshot is at the right.)

The GIMP provides not only excellent "paint" tools, but a comprehensive set of filters (or plug-ins), plus embedded scripting (via the Scheme-like Script-Fu, Perl, or Python). There are some issues where the user interface is concerned, but they're centered around how easy it is to get to the incredible number of tools available: the GIMP is still a fairly easy program to pick up, even if it is cumbersome to use at times.

Most distributions include the GIMP, though many are still using the older 1.0 series of releases. The project is currently well on its way to version 1.2, however, which includes quite a few changes in functionality and includes some usability tweaks.

Helix Code packages a current developer's version of the GIMP as part of their GNOME release. The Debian Helix Code packages currently includes version 1.1.24. Since Helix Code builds their releases around the unstable (Woody) release of Debian, you may need to pay a visit to the Debian package archive to meet some dependencies. Specifically, the GIMP depends on a version of aalib found in Woody.

If you aren't using Helix Code, and your distribution doesn't have a very current version of the GIMP, you can always visit the project's download page.

There's a lot to play with in the GIMP, but we're going to concern ourselves with the parts you can use to clean up or manipulate your digital photographs.

Basic Manipulation
The GIMP, despite its huge number of plug-ins and scripts, provides a lot of very simple and basic tools for working with an image that can go a long way to helping simple photographs look pretty nice. A good place to start is with the "Image" menu, which you can access by right-clicking anywhere in a photo you're working on.

The Image menu contains tools for manipulating color balance, contrast and brightness, and the hue and saturation of an image. These are all essential to tweaking out environmental factors you couldn't control when you took the picture, or to help out cameras with odd characteristics, such as the tendency to cast everything with a blue tint. My own camera, for instance, has a black & white image mode that introduces some purple in the shading... by using the Desaturate option under the Image/Colors menu I'm able to remove that purple quickly and easily. You can also use the Desaturate tool to striking effect by simply selecting an area of the image using the Smart Scissors or Bezier Curve tool and selectively desaturate (remove the color from) the area you selected.

Another useful option located under Image/Colors menu is the Filterpack tool, which allows you to manipulate the hue, color, and saturation of the image interactively, by presenting thumbnail previews of the results of any changes. The tool is very flexible in that it allows you to select which elements of the picture you'd like to work with: the highlights, midtones, or shadows. This is a great tool for working on pictures afflicted with poor lighting, murky shadows, or uneven bright spots.

Once you've cleaned up your photo with the basic tools, there's still plenty you can do with it using the GIMP. Here's a quick list of other tools that are especially useful with digital photos:

In the Toolbox
The Dodge and Burn Tool: This tool is located on the bottom row of the main window of the GIMP, and looks like a small paddle. Dodging and burning are basic skills for every darkroom technician and they can save an unevenly lit photo. The GIMP provides a digital equivalent to waving a paddle (or finger, or piece of paper) between the enlarger light and photo paper. This tool is a good one to use with a fuzzier-edged brush.

The Blur/Sharpen Tool: Also located on the bottom row of the GIMP toolbox, this tool allows you to selectively blur and sharpen parts of the image using the brush you've selected. Because most digital cameras are little better than point-and-shoots, this tool comes in handy if your camera set your depth of field a little too deep, or if there's an element of the photo you'd like to deemphasize a little.

Using Script-Fu
Script-Fu is an extension to the GIMP that allows users to develop scripts that automate sequences of plug-ins and enhancements to an image. There are plenty of scripts included with the base GIMP distribution.

If you're looking to add some effects to your pictures, right-clicking on the picture and selecting "Script-Fu" and then "Decor" will present you with several scripts that range from adding a bevel to the image to adding simulated coffee stains or rendering the image in sepia tones.

Use these scripts carefully--the GIMP has an 'undo' option, but it treats scripts for what they are: a series of distinct commands. By default, the GIMP allows you to undo up to your last five commands. Most script-fu scripts perform many more operations on your image than that. If you're offered the opportunity to "work on a copy" of the image, take it. If you mess things up too badly, by right clicking on the image, selecting 'File' and then selecting 'Revert', you can restore the picture to its state when you first loaded it from disk.

Some Filters
In addition to basic tools and scripts, the GIMP packs a bunch of image filters. In particular, check out the filters offered under Enhance. One allows you to clean out digital artifacts like speckling, another enhances the overall sharpness of the image, and another allows you to reduce the overall sharpness.

If you're interested in preparing your pictures for display on a web page, the Web section of the filters menu offers tools to create image maps and prepare images for clean conversion from RGB to indexed palettes.

Put on a Slideshow

Once you've downloaded, massaged, poked, enhanced and manipulated your pictures into a usable state, it's time to show them off. There are a few basic programs for doing that.

The simplest image viewer available on the GNOME desktop is Eye of GNOME (EOG). This program is more of a simple component than anything, currently able to do little more than display an image. Unlike its predecessor, Electric Eyes, it offers no image manipulation tools. It's a good utility for just taking a quick look at your pictures, one by one.

A more useful program for presenting a series of pictures is GQView, a GPL'd GTK-based image viewer. It shows an index of thumbnailed images (by selecting 'Thumbnails' from the View menu), has a slide-show mode, and even allows you to view images in full-screen mode so you can avoid the distractions of your desktop while looking at your pictures. (It's shown at the right.)

GQview provides nothing in the way of image manipulation (though you can zoom in and out on images and configure it to always display pictures at a size suitable for your screen). On the other hand, it can be configured to provide shortcuts to other graphics programs for external editing if you decide an image could use a few last-minute tweaks.

If your distribution didn't include GQview, it's hosted on Sourceforge and the download page includes source and binary packages.

Copyright Jupitermedia Corp. All Rights Reserved.