C@ELOLJ

<]]\Zk`m\e\kYffbg_fkfkffcj G?FKF=I@

Find out how to turn your netbook into a fabulous photo tool.

BY DMITRI POPOV

etbooks are usually advertised Instead, you’d most likely use the This should display the camera model, as machines suited for light- netbook to pull photos from your digital the transfer mode, and the port the cam- Eweight tasks like word process- camera, do some light tweaking, and era is connected to – for example: ing and web browsing. But you can upload them to your Flickr account. teach your humble netbook a few new Canon Powershot SX100 IS 5 tricks using the right software. For exam- ^G_fkf) (PTP mode) usb: ple, you can turn your netbook into a Let’s start from the very beginning – Canon Powershot SX100 IS (PTP mode) 5 nifty digital photography companion. getting photos from your digital camera usb:002,004 Although installing GIMP and digiKam onto the netbook. Virtually every net- seems like a sensible thing to do, you book on the market comes with some Being a command-line tool, gPhoto2 is should resist the temptation to load sort of graphical application that allows rather straightforward to use. For exam- heavyweight applications onto your net- you to download photos from your digi- ple, you can download all photos from book. After all, you wouldn’t want to tal camera. However, if you want to fetch your camera using one simple com- use an underpowered netbook with a photos from the camera quickly and mand: tiny screen and limited storage for heavy with minimum hassle, consider using retouching and managing your entire the excellent gPhoto2 [1] command-line gphoto2 --get-all-files photo library – especially when you are tool. on the move. Besides photo transfer, gPhoto2 offers This downloads photos to the current a few nifty features that allow you to working directory, so make sure that you Dmitri Popov holds manage the camera directly from the switch to the folder into which you want a degree in Russian netbook (Figure 1). to download photos before you run the language and com- gPhoto2 supports more than 1,000 command. If your camera supports flag- puter linguistics. He camera models, so it works right out of ging already downloaded images, you has been writing exclusively about the box with pretty much any camera on can use the following command to fetch and open the market. Before you can start using only the newest photos: source software for gPhoto2, you have to let it detect and several years, and his articles have identify your camera by running the fol- gphoto2 --get-all-files --new THE AUTHOR THE appeared in Danish, British, North lowing command: American, German, and Russian These two commands are all you need to magazines and websites. gphoto2 --auto-detect load photos off your camera, but

88 ISSUE 100 MARCH 2009

088-090_workspace.indd 88 14.01.2009 17:08:17 Uhr Workspace: Netbook Photo Tools C@ELOLJ

=`^li\(1^G_fkf)XccfnjpflkfkiXej]\ig_fkfjXe[Zfekifcpfli =`^li\)1>kbXd`jXj`dgc\^iXg_`ZXckffc]fim`\n`e^Xe[[fnecfX[$ [`^`kXcZXd\iX% `e^g_fkfj]ifdpfliZXd\iX%

gPhoto2 has a few other clever tricks up gphoto2 --get-all-files 5 action is a single operation that the ap- its sleeve. The most interesting one is --hook-script 5 plication performs on the photos that the ability to remotely control your cam- /path/to/rsync_backup.sh you feed to it. Each action provides a era from the connected computer. This number of options; for example, the feature can be handy in many situations. This way, you can download photos Auto Contrast action has two options, For example, using the netbook as a re- from your camera and back them up in Cutoff and Amount, and you can specify mote trigger allows you to minimize one go. as many actions as you like and save camera shake, which can be particularly If using the command-line tool to them as a single action list. To add an useful when shooting in low light condi- download photos from the camera is not action to Phatch, press the Add Action tions. To trigger a shot with gPhoto2, use your cup of tea, use gtkam, a simple button and select the action you want the following command: graphical front end to gPhoto2 (Figure from the list. By selecting a category 2), to establish a connection to your from the Select drop-down list, you can gphoto2 --capture-image camera that lets you browse, view, and narrow the list to a specific action type. download photos. Alternatively, you can use the Search This fires a shot without making any ad- To connect gtkam to your camera, feature to search for a particular action. justments, but you can also specify the choose Camera | Add camera, select the Say you want to add an action that ap- , shutter speed, ISO, and other appropriate camera model and port, and plies a text watermark to your photos. settings with the --set-config command, press OK. Then press the Rescan button Choose the Text action and press the provided this feature is supported by to connect to the camera and fetch your camera. With the use of the thumbnails. Now you can browse the gphoto2 --list-config command, you can photos on your camera. To view a spe- see what parameters you can use with cific photo, right-click on its thumbnail your camera. The --interval and --frames and choose View with | Built-in viewer parameters let you specify how many from the context menu. The same menu shots the camera should fire and the also offers the Save as command, which time interval between them. For exam- allows you to download the selected ple, the command below takes five pho- photo to the netbook. tos at three-second intervals: G_XkZ_ gphoto2 --capture-image 5 Although your netbook doesn’t have --interval 3 --frames 5 enough power and screen real estate for serious image editing, it can cope with This can come in handy for time-lapse light tweaking, like adjusting contrast photography. Another useful parameter and brightness or resizing, watermark- is --hook-script. As the name suggests, it ing, and rotating photos, for example. allows you to attach a script to the To do all this on your netbook, you need gphoto2 command. For example, you can Phatch [2] – an easy-to-use graphical create a simple script that backs up pho- batch processing tool (Figure 3). Unlike tos in a specific folder with the use of traditional image editing applications, the rsync tool and then attach the script Phatch doesn’t allow you to edit photos =`^li\*1G_XkZ_c\kjpflgifZ\jjpfli to the gphoto2 --get-all-files command: directly. Instead, you create actions. An g_fkfj`eYXkZ_\j%

MARCH 2009 ISSUE 100 89

088-090_workspace.indd 89 14.01.2009 17:08:19 Uhr C@ELOLJ

"is_friend": "0", "is_family": "0" }

Now run the uploadr.py script with the following command:

python uploadr.py

Next, authorize the script to access your Flickr account (Figure 4). When you launch the script, it checks the specified directory for new pictures and automati- cally uploads them. By default, the script scans the directory every minute, but you can change that by modifying the =`^li\+19\]fi\pflZXelj\k_\lgcfX[i%gpjZi`gk#pfl_Xm\kfXlk_fi`q\`k% SLEEP_TIME = 1 * 60 line in the up- loadr.py file. Also, you can run the script Add button. Then use the available op- Besides the Execute button, Phatch offers as daemon with the -d switch: tions to tweak the action. For example, another feature that makes the batch the Text option allows you to specify the process even more straightforward. python uploadr.py -d text of the watermark. With the use of Choose View | Droplet, and Phatch be- variables, you can either specify a static comes a floating icon. Drag photos onto If you don’t like to work from the com- text (e.g., “Copyright (c) Dmitri Popov, it, and the application processes them mand line, there are plenty of graphical 2009”) or create a dynamic watermark. with the currently opened action list. utilities that let you upload your photos If you want the watermark to include to Flickr. FlickrUploadr [4], for example, a timestamp, you can use the appropri- LgcfX[`e^G_fkfjkf=c`Zbi wraps the uploadr.py script into a simple ate variables such as , , Flickr is not only the best service for graphical interface. To install Flickr- , and : sharing photos with the world – it also Uploadr, download the latest archive, makes a great backup solution. Dozens unpack it, switch to the resulting direc- Copyright (c) Dmitri Popov, 5 of utilities are available for you to use tory in the terminal, and run the follow- Time: / 5 to upload photos to your Flickr account. ing command as root: :: But when you are on the move, you probably would want the most simple python setup.py install Using other available options, you can and lightweight tool for the job. And the specify orientation, font, size, and other uploadr.py [3] Python script meets both Now you can start FlickrUploadr by run- watermark properties. Once you are sat- requirements. ning the Uploadr command in the termi- isfied with the settings, you have to add To make the script work on your net- nal. To upload photos to Flickr, drag the mandatory Save action; without it, book, download the uploadr.txt and xml- them onto the Uploadr window, fill out Phatch won’t know where to save the tramp.txt files and rename them uploadr. the fields in the opened Pictures infor- processed photos. py and xmltramp.py. Now move the xml- mation window, and press OK. Besides options such as output format tramp.py file to the /usr/lib/python2.5/ and quality, the Save action also offers a site-packages directory (if needed, re- =`eXcNfi[ set of variables that you can use to spec- place python2.5 with the Python version A netbook won’t replace your desktop ify a destination for the processed pho- installed on your system). machine for processing and managing tos. For example, the default folder_ Next, you have to configure the set- your digital photos. But with the right phatch/subfolder variable tells Phatch to tings in the uploadr.py script. To do this, software, a netbook makes a perfect digi- save the processed images in a separate open the script in a text editor, locate the tal photography companion that you can folder inside the source directory, IMAGE_DIR = "images/" line, and re- use to load photos off your camera, per- whereas the root/phatch/year/month/ place "images/" with the path to the di- form light tweaks on them, and upload day variable creates a directory structure rectory containing the photos. them to Flickr. p on the basis of the current date. Except Use the Flickr section of the script to for the Save action, which must always specify settings for uploaded photos, for INFO be the last action in the list, you can re- example: [1] gPhoto2: http://www. gphoto. org arrange the actions in the list by drag [2] Phatch: photobatch. stani. be and drop. FLICKR = {"title": "", [3] uploadr.py script: To process photos with the action list, "description": 5 berserk. org/ uploadr/ press the Execute button, choose the di- "Uploaded from my netbook", [4] FlickrUploadr: rectory containing the photos you want "tags": "backup", micampe. it/ projects/ flickruploadr to process, and press the Batch button. "is_public": "0",

90 ISSUE 100 MARCH 2009

088-090_workspace.indd 90 14.01.2009 17:08:20 Uhr