Using a digital camera with Linux

Most PC users don't associate the Linux operating system with digital photography, or graphic manipulation. In this column, we take a look at how to connect your digital camera to your PC and download the files using Linux. We will also get your digital snaps organised and step you through using an image application - Album - to publish the photos.

Interfacing with a digital camera

Most USB digital cameras can be accessed using Linux with an application known as gPhoto (www.gphoto.org), which currently supports 162 digital cameras. The latest version of gPhoto has been included on August's cover CD.

Once installed, accessing your digital camera with gPhoto is very easy. gPhoto is a command-line application, so you will need to open a shell. To test if gPhoto is working with your camera, first plug your camera into a USB port and turn it on. Once started, type the following:

$ gphoto2 --auto-detect

This command will search for any supported cameras and return the model name of your camera if it is found. Once you have this information, you can access the camera. To test your camera, type the following:

$ gphoto2 --camera --summary

Now the photos can be extracted from the camera. To copy all the photos from the camera to the current directory, type:$ gphoto2 --camera --get-all-filesThere are a large number of commands offered by gPhoto. To obtain a list of them, type the following:

$ gphoto2

Storage-based cameras

Some digital cameras can not be accessed by gPhoto. They act as storage devices (like another hard disk) and can be accessed using Linux's built-in USB driver. Once the camera is plugged in and turned on, you can access it as you would a normal disk. If you have no SCSI disks, your camera will be accessible as /dev/sda1; if you have one SCSI disk it will be /dev/sdb1, and so on. To access the camera, type as root:

$ mount /dev/sda1 /folder/to/mount/under

Getting started with Album

Included on August'ss cover CD is a handy photo album application for Linux and Windows called Album (http://MarginalHacks.com/Hacks/album). Before installing Album you must first install ImageMagick, available from www.imagemagick.org. Following this, copy Album to /usr/local/bin and make it executable:

$ chmod +x /usr/local/bin/album

Basic album building

Album uses the directories on your hard disk as a structure for building photo albums, and sub-directories are built into sub-albums. Organise all your photos into directories, each directory corresponding to an album. Once you are happy with your organisational structure and are ready to build the album, in the base directory type:

$ album

Album will create an index.html file in the current directory from which you can view the photo album.

This first photo album is pretty basic, lacking features such as comments and having quite a bare overall layout. Adding comments and titles to images is easy and can be done in two ways. You can create a text file containing the comment in the same directory as an image, using the same name but changing the extension (.jpg, etc.) to .txt. Or, it is possible to store all comments in a single file called captions.txt. This file has three fields: filename, title and comment, each separated by a tab. An example line in this file is:

soccer.gif-> At the Soccer-> Just after they scored!

Album also allows you to customise the look of your photo album. Perhaps you want bigger thumbnails? This can be accomplished by adding the -geometry XxY option to the Album command. The default thumbnail size is 133x100. You can make this bigger, for example, by typing:$ album -force -geometry 166x125It is also possible to resize your images to speed up Web downloads. The following would scale the size of each image to 50 per cent of its original:

$ album -medium 50%

To publish the album, upload the entire contents of the directory to your Web site. Additionally, you can burn the album onto a CD.

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Alastair Cousins

PC World

Comments

Comments are now closed.

Most Popular Reviews

Follow Us

Best Deals on GoodGearGuide

Shopping.com

Latest News Articles

Resources

GGG Evaluation Team

Kathy Cassidy

STYLISTIC Q702

First impression on unpacking the Q702 test unit was the solid feel and clean, minimalist styling.

Anthony Grifoni

STYLISTIC Q572

For work use, Microsoft Word and Excel programs pre-installed on the device are adequate for preparing short documents.

Steph Mundell

LIFEBOOK UH574

The Fujitsu LifeBook UH574 allowed for great mobility without being obnoxiously heavy or clunky. Its twelve hours of battery life did not disappoint.

Andrew Mitsi

STYLISTIC Q702

The screen was particularly good. It is bright and visible from most angles, however heat is an issue, particularly around the Windows button on the front, and on the back where the battery housing is located.

Simon Harriott

STYLISTIC Q702

My first impression after unboxing the Q702 is that it is a nice looking unit. Styling is somewhat minimalist but very effective. The tablet part, once detached, has a nice weight, and no buttons or switches are located in awkward or intrusive positions.

Latest Jobs

Shopping.com

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?