| Home | Pauline's Pages | Howto Articles | Uniquely NZ | Small Firms | Search |
| Ubuntu Linux on the Take |
Fun with Ubuntu Linux || Ubuntu Linux on the Move || Ubuntu Linux on the Take - Introduction | Digital Photography | Requirements for supporting Digital Photography | Support Available in Ubuntu for Digital Photography: Hardware Support - F-Spot - GIMP - Picasa - IrfanView - Wine | Utilities I have Developed | Conclusions | Reader Feedback || Open Source, Free and Cross-Platform Software
The main page covering my experiences in making the transition from Microsoft Windows to Ubuntu Linux - Fun with Ubuntu Linux quickly become excessively long. This is the second specialised page which covers how to handle all the pictures we take in the Digital Camera era using Ubuntu Linux.
One of my main reasons for making the transition to Ubuntu was the huge, expensive and uncontrollable flow of data whilst on the move when using Microsoft Windows XP. I got so tired of the continual updates to the Windows XP system and the associated Virus checkers, Firewalls and Malware detectors. Linux was attractive because it needs no virus checkers or separate firewalls which need updating and no unstoppable or essential automatic system updates. The subject of my first specialised page was therefore Ubuntu Linux on the Move which covered all aspects of communications when away from home. Perhaps the second most important activity after communications for inveterate travelers like ourselves is handling all the photographs we take with digital cameras, viewing them and ultimately putting them into a form that can be used on our web site. Retaining the fun approach I have called it Ubuntu Linux on the Take. Logically the third will be "Ubuntu Linux on te Make" covering Web Authoring!
Digital Photography support has become a major use for computers over the last 4 or so years and increasing so for laptops for use whilst on holiday to download and backup the cards in the camera. This provides a major logistic and storage problem - we have taken some 16,000 pictures in the last 4 years of which less than 25% are printed and even less added to our web site. Many more are used as reference - we take many pictures of, for example information boards for background information so they still have to be easily found.
Firstly it is worth looking at the important differences between graphic images from a digital camera and other images. The photographic images are mostly stored as JPEG (Joint Photographic Experts Group) compressed images, the same format used for most web images and most other photo type images. The difference is that there are now extensions to the format which allow additional information on the camera settings when the picture was taken such. Some are well known and defined such as EXIF, some are more flexible in the metadata they can contain. Early graphics packages ignore the metadata or strip it out and when you modify and save the graphics file it will have been lost permanently. Newer packages give the choice of striping it out or retaining it unchanged - some allow limited changes or new metadata data to be added.
Most Digital Cameras come with their own basic software for Windows PCs and sometimes Apple computers - none come with software for Linux however most of the functionality is built into Ubuntu Linux although some may need to be installed from the CD or repositories. In fact the Ubuntu software is often superior and makes it easy to use cameras from several vendors and integrate the pictures.
Before we start on the details there is one basic point which needs making: Whatever software and hardware you use it is essential that you set the time in your camera accurately and reset it as one changes time zones. If you have several cameras you need to be relatively accurate to a few seconds to interleaf pictures correctly - that needs some care and both cameras side by side. If you have not got it right some editors allow you to adjust the time code in the EXIF data but that is very time consuming.
First we should look at what is required.
Now we have laid out our requirements we can look at what is available in Ubuntu Linux.
Firstly almost all cameras are recognised as a USB mass storage device if plugged into a Ubuntu Linux computer. The System -> Preferences menu has a Cameras tab which allows you to set up for automatic importing using your selected program (gThumb by default, F-Spot by preference). I prefer to plug my camera card in via a PCMCIA card or USB adapter so have not used gThumb or F-Spot this way. Ubuntu automatically recognises that a USB or PCMCIA mass storage device has been plugged in but you may need to mount it after which it will appear in the media folder in the root file system
F-Spot (Downloading, Cataloging, Displaying and Basic Editing) is available in Ubuntu Linux Dapper Drake but needs to be installed from the CD or Internet Repositories and is the accessible from the Graphics menu. I use F-Spot to 'download' the pictures from the card by using its Copy files to the Photos folder option. This creates a folder called Photos in your home folder with sub-folders for year, month and day and adds them to its catalog. Beware it does not warn you if the files have already been downloaded but just creates a -1 , -2 etc version so work out a procedure if you want to download at various stages without clearing the card. (hint - use the tagging facilities so you can delete overlaps).
F-Spot displays are based on a timeline and has multiple tagging so you can use tags to select pictures for printing, slideshows, exporting to another folder etc and also for 'tagging' by classes such as holiday etc. You can create your own hierarchy of tags. This is a very simple but powerful system which is far better than my Canon Zoombrowser software where one ends up copying into multiple folders.
When we come to editing. F-Spot has a number of built in basic sizing and correction functions including cropping and a very useful colour temperature correction. When editing you can use a copy called filename (modified) and switch between the two as required. You can also use external graphics editors such as the very powerful GIMP and again you have the option of make a copy first.
The version of F-Spot in Ubuntu 6.06 (Dapper Drake) is 1.1 - the latest version of F-Spot which is available in Ubuntu 7.04 is 3.5.
GIMP (Sophisticated Image Processor) is considered my many to be on a par with Adobe Photoshop in most ways but is Open Source and runs under Linux and Windows. It is always installed in most Linux distributions including Ubuntu. GIMP seems daunting when you first open it but is actually very easy to use and provides a huge number of facilities with instantaneous previews. I will just mention those I find indispensable: Rotation, perspective correction, cropping with and without the aspect ration being maintained and changes in resolution. Colour corrections are always difficult but hue and RGB corrections are available as usual but not the colour temperature correction I find helpful in F-Spot and Picasa. Brightness and contrast are obviously available. I also used to use a gamma correction a lot in PaintShop Pro 4.2 - this allows one to bring out detail in the shadows by a non-linear brightness curve. This and more can be done done just as simply by GIMP using the curves function - it is difficult to describe but a few seconds experimenting makes its power and effectiveness clear. The combination of simple corrections in F-Spot and then more complex ones when required in GIMP is perfect. In practice my Canon A75 is so good that only a few photos require manipulation in colour so one is only correcting ones own errors in rotation or abuse in perspective and perhaps gamma type adjustments to bring out details in dark areas of a picture.
Google Picasa (Complete Suite of programs) I can not leave the handling of digital photographs without mentioning Google's Picasa. Picasa was written for Windows by Google and also is provided for Linux using a custom version of WINE which Google have supported. I have covered installation in Fun with Ubuntu Linux. It is a self contained Photo Management and Cataloging system which will index a selection of folders using both the folders and a time-line. It has a basic tag like function by 'starring' pictures and a collection of photos can be gathered into a 'tray' from different folders to work on or export. Pictures can also be given keywords which can be used with a Search function, even so these features are less powerful or convenient than F-Spot because of the folder structure.
However since writing some of the above I have realised that the ability to create albums is very powerful. For example lets say we want to create a folder of pictures to print and a folder of pictures which will end up on the web. First we go through all the pictures in the time frame and put a Star on those to Print. Now those pictures are also in the Special Sytem Album called Starred Photos. If we look at that we can select those in the correct time frame (you may have other starred pictures) by a click at the start and shift-click at end then at the bottom middle click Add To -> New Album and call it MyPicturesToPrint1. We now have all those pictures in an album and if we display that we can clear all the existing Stars and then Star those for the Web folder, select them and Add To another New Album called MyPicturesForTheWeb1. Those folders can eventually be exported (which makes a copy) to a folder within Windows to use outside of Picasa.
The main advantage of Picasa is that it has some very effective automatic procedures for enhancing pictures which can have almost unbelievable results - for example I took a picture in Hong Kong in mist/pollution which had all the detail washed out and a colour tint; Picasa's one click enhancement made it look as if it had been taken on a clear day. It has the usual rotation and red eye functions as well as colour enhancement and a number of various filters. It has a very effective colour temperature adjustment which I used to correct all the pictures of posters taken indoors in natural light which slightly fooled the cameras white balance. The only shortfall is that it has no perspective correction. The originals are not modified and each change can be progressively undone. The modified pictures can be exported to a folder which can be then indexed by F-Spot. You can also rotate and crop the pictures, again it is reversible. Picasa seems to have no way of maintaing the Aspect Ratio of the most common Digital camera ratio 4:3 but I have found an undocumented trick to achieve 4:3, square, and 3:2 crop ratios. To get a 4:3 ratio, you would hold down CTRL while in manual crop mode. For the 3:2 crop ratio, you can hold down the ALT key while in manual crop mode. You can also get square ratios by holding down the SHIFT key while in manual crop mode. So far I have only tested that feature in the Windows version 2.7. On the subject of tricks you can get a full screen image by hovering the mouse over the photo and press CTRL then also ALT - it is full screen until you release a key - howver slideshow does the same and has more features available.
A shortfall in Picasa is in importing pictures from a camera card where there is no ability to import all the pictures in a folder and sub-folders that I have found which means that they have to be imported folder by folder (approx 100 at a time) and each import has to be given a name. I have not tried direct from a camera. Picasa is however good in that it ensures that one does not import duplicates. The photos are imported into a folder structure in the home directory.
IrfanView (Graphics Browser, Editor, Slideshow Manager and Batch Converter) is another Freeware program written for Windows which I find indispensable. Fortunately it runs perfectly under Ubuntu Linux using WINE. I covered installing Wine and using it to install and run programs in Fun with Ubuntu Linux-Wine. IrfanView preserves and to some extent allows you to manipulate EXIF data. It allows you to Browse graphic images, Create Slide Shows and save their contents, convert from one format to another and carry out powerful Batch commands with renaming. You can save most of the configurations for batch commands and load lists of Files. You can also carry out most of the functions one needs on photos including cropping, resizing, rotation, contrast brightness, gamma, compression, red eye and colour balance adjustments (only colour temperature and perspective are missing). You have a preview as all these adjustments are done from one control panel before finalising them. It is my preferred program for slideshows.
Irfanview also allows you to join up pictures taken to give panoramic views, usually a feature of the Cameras software - I have not tried it yet.
Irfanview can be downloaded at www.irfanview.com and there are plentiful help files although most of it use is very intuitive. I am currently using version 3.95 under Windows XP and in Ubuntu running Wine 0.9.29. The latest version of IrfanView is 4.00 which is Windows Vista compatible runs under Windows XP but the installer does nothing under Wine 0.9.29.
Wine: Wine Is Not an
Emulator nor is it a graphics program however Wine does enable one to run many useful Windows
Programs in Linux including graphics programs. It is under continuous development and the
number of applications it can handle has increased dramatically including a number of the most
demanding games. Because it is under continuous development one needs the latest version and
that has obvious risks. I have used Wine to run two well behaved Windows graphics applications;
Paintshop Pro and Irfanview. I got the information from Ubuntu Hacks (See the book list below)
and their website at Wine HQ. To loosely quote "Wine is an
Open Source implementation of the Microsoft Windows API on top of the X windows system and Unix.
Wine is a compatibility layer for running Windows programs and does not require Microsoft
Windows, as it is a completely free alternative implementation of the Windows API consisting of
100% non-Microsoft code"
There is version of Wine available packaged in Ubuntu but the latest versions can be utilised by
adding a new repository to Synaptic Package Manager accessed via Applications Add/Remove by go
to Advanced and selecting Settings->Repositories. Then click add, select custom, and For
Ubuntu Dapper (6.06): enter the following:
msttcorefonts
I have my system set up with a Partition accessible from both Windows and Ubuntu on our lap top. This has a folder called My Photographs into which I used to download my photographs from the two Canon Cameras using Canon's Zoombrowser software. I now want to use F-Spot which is generally much more powerful but still keep the photographs on the shared drive. F-Spot has no problem cataloguing the existing photographs but its built in download goes to a folder Photos in my home folder. Furthermore when I download from the camera card it makes copies if I inadvertently download the same pictures twice or more times which I tend to do with big cards - one likes to back-up and have a look before taking 500 or more pictures. I have therefore written a single line terminal command to do an intelligent copy from ~/Photos to /media/hda6/My Pictures. It only copies the original, not the multiple copies and only overwrites if the file is a newer version. Having run the copy one should delete the photos in Photos using F-Spot and only then re-import them from My Pictures on the shared drive - this avoids having two copies in the database.
The command uses one of the most powerful of Linux's built in commands find which executes cp on all the matches.
cd ~/Photos; find -not -name *-[123456789].jpg -name *.jpg -exec cp --parents -u {} ~/Photos2 \;
This is how it works: First one changes into the Photos folder with a cd ~/Photos; so that some of the clever copy options work correctly later. Then find searches for all JPEG Images (-name *.jpg) except those ending in -1.jpg, -2.jpg, -3.jpg, -4.jpg etc (-not -name *-[12345].jpg ) which are the multiple copies. The find command has some very powerful options including -exec command \; which runs command on all the matches - if the string is needed one uses {} to represent it. My one liner executes the cp command with two options --parents means that the path to the files is included and the -u option to prevent overwriting unless the file being copied is more recent. For this demonstration I am copying into Photos2 in my home directory whilst in real life I am copying to My Pictures in my shared partition ie "/media/hda6/My Pictures"
This can be run from a launcher on the desktop but as it is a complex command it needs to be put in a BASH script file which by convention lives in the ~/bin directory. I called mine PhotoCopy and the file contents is:
#!/bin/bash
cd ~/Photos
find -not -name *-[123456789].jpg -name *.jpg -exec cp --parents -u {} ~/Photos2
\;
This needs to have the permissions set to execute for Owner as well as read and write (Right click -> Properties -> Permissions tab)
Then right click anywhere on the Desktop -> Create Launcher - Give it a name such as PhotoMove, browse to ~/bin and highlight the file. You can click on Icon to select an Icon and OK and you are finished.
Ubuntu Linux has all the facilities to handle photographs that I had under Windows, in fact the main photo and graphics editors I use (Paintshop Pro, IrfanView, Picasa and GIMP) all run both under Linux and Windows. Under Windows I use the Canon Zoombrowser program to 'download' pictures from the camera/card whilst under Linux there is a much more powerful program for downloading and photograph management in F-Spot. The problem is one of deciding which programs to use - in the case of perfect pictures one only needs F-Spot to get them in and select the ones for printing and web use followed by InfanView in batch mode to reduce the resolution, increase compression and rename them for web use. Minor corrections can be also done in F-Spot. More serious corrections can use GIMP, Picasa or Irfanview (for Gamma).
I would be very pleased if visitors could spare a little time to give me some feedback - it is the only way I know who has visited, if it is useful and how I should develop it's content and the techniques used. I would be delighted if you could send comments or just let me know you have visited by Sending a quick Message to me.
Fun with Ubuntu Linux || Ubuntu Linux on the Move || Ubuntu Linux on the Take - Introduction | Digital Photography | Requirements for supporting Digital Photography | Support Available in Ubuntu for Digital Photography: Hardware Support - F-Spot - GIMP - Picasa - IrfanView - Wine | Utilities I have Developed | Conclusions | Reader Feedback || Open Source, Free and Cross-Platform Software
Home page | Pauline's Pages | Howto Articles | Uniquely NZ | Small Firms | Search
| Copyright ©
Peter and Pauline
Curtis Content revised: 13 th April, 2007 |