There’s a good chance that during the holidays, you were gifted (or gifted yourself) a brand new digital camera. Because advanced CMOS technology is now a commodity, just about anyone can get really stellar photos out of a consumer digital camera. For example, the camera I bought over the holidays, the 7.1–megapixel Canon A620, which features 1–centimeter macro focus capability and the latest–generation DIGIC II image processor, has a modest street price of around $350–$400. Its 5–megapixel sibling, the A610, is about $100 less, yet takes great pictures as well.
You probably noticed, however, that your camera comes with Windows or Macintosh software — that doesn’t do much good on your Linux desktop platform. When combining your digital camera and Linux, there’s good news and bad news.
First, the bad news: While there’s been some advancement in the last several years in natively interfacing digital cameras with Linux, the variety and quality of programs on Windows and Macintosh are currently superior to what you can find on Linux, where many programs and support libraries are in a beta or even an alpha state. Furthermore, if you have a newer digital camera, chances are that you probably won’t be able to interface with it directly. The good news is that there are workarounds to get the Windows camera software working in Linux.
But let’s start with native support first.
Getting Your Camera Connected, Not!
In Linux, direct camera interface support is provided by the gphoto2
). Depending on which Linux distribution you’re using, you might be running the most current version of gphoto2, which was released in June of 2005, or one of the pre–release test versions in the gphoto2 CVS
tree. Needless to say, if you have a digital camera that was introduced after June of 2005, chances are it will probably not directly interface via USB
with any of the applications that hook into gphoto2.
Now that I’ve got you cursing for not buying a camera supported by Linux, relax. Instead of interfacing your camera directly with Linux, you can go out and purchase an inexpensive USB card reader that’s detected as a regular USB mass storage device and is strongly supported under Linux and gphoto2. In fact, the Linux usb–storage driver module is probably one of the most mature driver modules out there.
Which card reader to get? If you want to have all your angles covered, in case you want to ever read any kind of media card format the world can practically throw at you (and also use it to stuff music and data on your MP3 portable, as well as your PDA) my choice would be to go with one of the USB 2.0 multi–readers that can read SD, MMC, CF, Memorystick, and xD. The peripheral vendors I recommend are Lexar Media, SanDisk, and Belkin. I was able to pick up a 12–in–1 SanDisk Imagemate USB 2.0 from Amazon.com, with free shipping, for $27. The no–name Chinese/Korean ones you’ll find on Pricewatch.com go for about half that price, and usually work just fine, but sometimes the construction on those things can be pretty sloppy, so your mileage may vary.
Even if you have an older camera supported by gphoto2, you should probably get a card reader anyway. If your PC supports USB 2.0, a USB 2.0 card reader transfers photos much, much faster than your native camera mode is likely to transfer at, since USB 2.0 is 40–times faster than USB 1.1. This is particularly helpful when you are taking photos at max resolution or in RAW mode (which I’ll get to later).
After plugging your USB card reader into your PC, you can confirm that it’s been detected properly by issuing dmesg from a terminal prompt. If you see a message like this at the end of the output stream, you’re all set to go:
% dmesg usb 2–1: new full speed USB device using uhci_hcd and address 7 scsi4 : SCSI emulation for USB Mass Storage devices usb–storage: device found at 7
You can now go ahead and pop the storage card from your camera into the card reader. Most of the newer distributions, such as SUSE Linux 10, Ubuntu 5.10 (“Breezy Badger”), and Fedora Core 5 will auto–mount the card under the /media directory on your root volume. Depending on what type of card it is and what the volume name is, the card might be called something like usbdisk, usbdisk1, CANON_DC, or something else entirely.
gphoto2 Kung Fu
Now that your reader is connected to the computer and the device is mounted, you’re ready to use some of the native Linux front–ends for digital photo editing.
First, verify that gphoto2 is installed on your system. From a terminal window, type:
If you receive the following, you’re ready for action:
Usage: gphoto2 [–?] [–?|––help] [––usage] [––debug] [––quiet] [––force–overwrite] [–v|––version] [––list–cameras] [––list–ports]
If not, install gphoto2 using your native software management utility. Assuming that you’re using Debian or Ubuntu and that you’ve pointed your package manager towards a working repository mirror, you can install gphoto2 using apt-get with:
% sudo apt–get install gphoto2 \
gtkam gtkam–gimp gimp
If you’re using SUSE, you’ll want to install the same packages packages using “Software Installation” in the yast2 graphical user interface (GUI). In Fedora, you’ll want to use yum install gphoto2 gtkam–gimp gimp. If in doubt, full installs of both SUSE and Fedora should install all of the software you need.
Next, you’ll need to test the connection to your USB reader device. Issue this command to tell gphoto2 you’re using a card reader:
% gphoto2 ––camera=”Mass Storage Camera”
Next, query gphoto2 to list the data directories on your storage card:
% gphoto2 –l
You should get output similar to the following:
There is one folder in folder ‘/’: – dcim There are 2 folders in folder ‘/dcim’: – 102canon – 103canon There are no folders in folder ‘/dcim/102canon’. There are no folders in folder ‘/dcim/103canon’.
This means everything is working properly.
GIMP and other gphoto2 Graphical Front Ends
If you’ve been reading this publication for a couple of years, you probably have seen or even tried GIMP, or the GNU Image Manipulation Program. GIMP is by far one of the most powerful image processing software packages on any computing platform.
GIMP is able to interface directly with your card reader thru gphoto2’s gtkam helper applet. Assuming you’ve launched GIMP either thru KDE or GNOME or by typing gimp in a terminal window, you can browse through your storage card using “File& gt; Acquire& gt; Load From Camera”. Your storage card should show up as “Mass Storage Camera” in the gtkam browser window, and you can drill down into the directories on your card from there. (See Figure One.)
Another important thing that GIMP can do is read RAW format images using the gimp–dcraw and gimp–ufraw plug-ins (which are also installed via apt, yum, or yast2). What’s RAW? If you have a Digital SLR or a high–end “prosumer” digital camera, you likely have the ability to shoot photos and store image data in a raw uncompressed format. In effect, this is the exact data that your camera’s CMOS sensor captures when you snap a photo, before it gets sent through the image processor and saved to your data card as a JPEG file. RAW gives you much more flexibility because you have far more granularity and there is no image “loss.” When you import a RAW image into GIMP, you are given an advanced set of controls, such as the ability to alter white balance on the fly. Once you’ve finished tweaking your RAW image, you can then save it as a JPEG file and manipulate it as normal.
GIMP is a very, very sophisticated and complicated application, so obviously it’s much too big to be discussed at length in this article. If you really want to get jiggy with it, I suggest you head over to the gimp.org web site and pour through the online documentation. Unfortunately, the currently published GIMP books are several years out of date. (In April 2006, Beginning GIMP: From Novice to Professional by Akkana Peck, is due to be released, and is the first new major work on GIMP in English to come out in a long time.)
If you find GIMP to be overkill, check out digikam
), an application more geared towards photo editing than image processing, and is the closest thing there is to something like Picasa
for Linux. digikam is built into SUSE LINUX 10.0 and is a KDE application. (See Figure Two.
) For Ubuntu and Debian, see http://www.digikam.org/?q
= download/binary/ for instructions on how to install the feeds. For those of you who prefer a native GNOME application, have a look at F–Spot
–spot/) which is in the very early developmental stages.[ Read columnist Scott Granneman’s impressions of F-Spot at http://www.linux-mag.com/2002-12/do_01.html
If you’re looking for native, commercial image processing and photo editing software for Linux, have a look at Pixel (http://www.kanzelsberger.com
). Pixel has some unique features, including blindingly-fast processing speed, real-time live effects, and advanced retouching tools. At the time of this writing, you can download a 30–day free demonstration or purchase it for $32.
While I’m all for native Linux software solutions and using them when they make sense, I’m also a realist. Windows–based photo editing software is just a lot easier to use, especially if you just want to make basic fixes to your photographs.
My photo editor of choice is Picasa (http://www.picasa.com
), a free program by Google. (See Figure Three.
) It’s a great application for cataloging and making quick fixes to your photos, such as altering brightness and contrast, color intensity, sharpness, fixing “red eye”, and for re–sizing photos for use on the web and in blogs. Unfortunately, Google doesn’t offer a native version of Picasa yet for Linux, and hasn’t yet said if one is forthcoming.
Many people prefer Photoshop Elements, because it’s a pretty decent program and it comes with a lot of the new digital cameras. Windows also provides the best level of RAW file import, because you can use the software that comes with your camera, as opposed to using a reverse–engineered filter for GIMP which may or may not perfectly support your camera’s native RAW format.
So, how can you get these packages to run on Linux? For starters, Picasa runs fairly well in the latest versions of the WINE Windows emulator, and more so using the commercial version of Crossover Office 5.0. Once you’ve copied your photos from your storage card onto your hard disk, you can use Picasa on WINE or Crossover Office to edit and catalog your photos.
However, for perfect Windows camera software support, my platform of choice is VMWare. Oh sure, that’s $200 per copy, right? Wrong.
If you didn’t have a chance to read my column last month (http://www.linux-mag
, com/2006-01/do_01.html), it was all about creating a Windows virtual machine (VM) in the 30–day evaluation version of VMware and then continuing to run Windows using the totally free VMWare Player
Once you’ve got VMware Player running, you can install Picasa, Photoshop, and your RAW editing software, and share data with your file system on Linux using VMWare’s shared folders: you simply map a network drive letter of your choice to \\.host\Shared Folders\ using Windows Explorer. Click on “Tools& gt; Map Network Drive.” Once you’ve done that, you can access your storage card in Windows by browsing to that network drive in your application’s file browser, and drilling down into the /media directory that contains your storage card.
Got any other digital photo tips on Linux or other “On the Desktop” column ideas? Be sure to ping me at jperlow@linux–mag.com.