Digital Photography and Linux

A primer for various digital photography programs available for Linux.
digiKam

For working with pre-existing digital images, we look at two applications, digiKam for KDE users and F-Spot for GNOME users. Both serve as clients for the gPhoto2 libraries. gPhoto2 is an open-source project that has created a software interface for digital cameras. At the time of this writing, it supports approximately 600 cameras (see Resources). digiKam is found in the Graphics menu item on the KDE start menu. Clicking on the program opens a single window (Figure 3).

Figure 3. digiKam Showing Downloaded Images

When you open digiKam the first time, you need to set up the camera. Make sure the camera is plugged in to the computer and turned on. Select Camera→Add Camera from the menu bar. First try Auto-Detect. If this does not work, click Add, and browse the list for your camera. Many cameras don't show up in the list but instead fall under the generic category of mass storage devices. Do not despair. When you hook up the camera to the computer and turn it on, it should show up on the desktop as a removable storage device. If this is the case and you cannot find the camera in the list, go to the right side of the window and select the port type (most likely USB) and camera mount path. The easiest way to find the mount path is to right-click the removable storage icon on the desktop and look under Properties.

Once you set up the camera, the fun begins. From the Camera menu item, select the camera or Directory Browse if it is seen as a storage device. This opens a window with the pictures stored on the camera. From here, you can use the buttons across the bottom to work with the images. When you download, you have the option of creating a new directory or storing to an existing directory. The pictures will show up in the right panel of the digiKam window. Opening an image loads it into an image viewer.

One stock capability of note found in the Fix menu item of the image viewer is Red Eye Reduction. The capabilities of the image viewer, as well as digiKam in general, can be extended by installing plugins. digiKam uses the KIPI (KDE Image Plugin Interface, see Resources) to manage plugins. The plugins include a module to work with RAW images. See the sidebar for information on RAW. It is possible to convert a RAW file to a JPEG, TIFF or PPM format. In versions 0.8.1 on, 8-bit RAW files can be opened in the image viewer, with 16-bit support promised in version 0.9.0.

F-Spot

F-Spot serves the same role in GNOME as digiKam does in KDE. It is not as far along in the development cycle as digiKam, so it is not quite as feature-rich. However, it does work well for pulling pictures from a camera and organizing them on your hard drive.

Opening the program presents a single window with a couple panes (Figure 4). In the right pane are thumbnails of the pictures that have been downloaded. Right-clicking on an image brings up a menu that, among other things, allows you to tag the image. There is a set of predefined tags, and you can create your own tags using the menu bar item Tags. The tag labels are listed in the left pane, and selecting them filters the thumbnails accordingly.

An interesting feature of the thumbnail browser is the time-line bar across the top. It represents a visual indication of the number of pictures by month and year. Use the mouse to move the slider (as you do so, you will see a date appear above the slider) to the month and year you are interested in.

Figure 4. F-Spot showing downloaded images—note the time-line bar across the top.

Image Editing—The GIMP

The discussion to this point has been concerned with getting pictures into the computer from an external source. Some mention has been made of manipulating images. Kooka, XSane, digiKam and F-Spot all can change the imported images to some degree, but to do more in-depth editing, it is necessary to use a dedicated image program. For this task, we look at The GIMP and CinePaint. The GIMP (GNU Image Manipulation Program) has been around since 1995 and is probably the most widely known open-source image program. CinePaint started as a fork of The GIMP in 1998, known as Film GIMP (also Hollywood GIMP and GIMP16) and acquired its current name in March 2003.

The GIMP follows the multiple window paradigm we saw earlier with XSane (Figure 5). The program window contains the toolbox. Placing the cursor over a tool icon brings up a help tip, and selecting an icon loads the tool options into the bottom half of the window. Once a tool is selected, moving the cursor over the image window shows the cursor pointer along with the tool icon, and left-clicking the mouse causes the tool action to take place. For example, selecting the eraser icon erases the area under the cursor according to the parameters selected in the tool options box (Figure 6).

Figure 5. The GIMP with an Open Image

Figure 6. Using the Eraser

Space does not permit a full exploration of the features in The GIMP, so I point out those I have found particularly useful. First, in an open image window, select Tools→Color Tools→Levels. A new window opens (Figure 7). Look for the Auto button, click on it and the image color levels are adjusted automatically (Figure 8). Often this is all you need to do to improve a picture. If the Auto correction does not work, next to the Auto button is a row of eye dropper icons representing the black point, grey point and white points of the image. Use one of the eye droppers to select a “known” color point in the picture, and the picture adjusts accordingly. You can undo your changes by clicking on Reset, so experiment away.

Figure 7. The GIMP—Auto-Adjust, Before

Figure 8. The GIMP—Auto-Adjust, After

This leads me to another often-used feature of The GIMP: Ctrl-Z—the undo command. The extent to which you can undo is set in the Preferences item of the File menu. The two main parameters are the minimal number of undo levels and the maximum undo memory. The first specifies the number of undos to save, regardless of memory usage. The second causes undo to drop items once they exceed the memory limit, except those exempted by the first parameter. The undo command has some other limitations; see the manual for a full rundown, but it does allow you to experiment with relative impunity.

This is good place to insert a practical tip learned in the school of hard knocks. Do not work with your original image. The first step when working with an image is to create a copy and work with the copy. That way, when you paint yourself into a corner or commit an unrecoverable act, you still have the original to start over with.

The real flexibility comes through the plugin architecture of The GIMP. The program comes with a series of default plugins, and you can extend these by downloading others (see Resources). Plugins can show up in many areas, so the best way to identify what is available is to use the plugin browser located in the Xtns menu item of the program window. One optional plugin I have found particularly useful is UFRAW (see Resources). It allows you to get around the 8-bit limitation current versions of The GIMP have on RAW files. Basically, it loads a RAW file into its own viewer at its native bitrate and allows you to adjust the image (Figure 9). After the image has been changed in the plugin, clicking OK mixes it down to the 8-bit format of The GIMP and opens a window for further work in The GIMP.

Figure 9. UFRAW Plugin for The GIMP

______________________

Adrian Klaver, having found Python, is on a never-ending quest to explore just how far it can take him.

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix