Photo organizing in Linux

13 November 2005

I’ve been wanting to organize my digital photos for some time now. They were scattered across a few CD’s and several folders on my hard drive. One problem I had was that I made backups and backups of backups, plus I have a tendancy to copy and resize entire directories of pictures for sharing on the Web. In short, my collection was a mess.

The first tool I used was the old standby GQview. I’ve long loved this speedy app as a basic image viewer, but it is much more than that. The biggest help for my task was its ability to automatically rename files during copy and to find duplicates.

I started by copying my scattered files to a single directory. If there was a conflict (a file with the same name existed), I just told GQview to automatically rename it and to overwrite all files.

You can choose how you want to match duplicates, and I always use checksum. GQview will show a list of matches–with thumbnails if you want–at which point you can select the first or second set and delete the duplicate files. It’s very handy.

Now that I had all my images in one place and no duplicates, I had to decide if I wanted to organize them in a folder hierarchy, and exactly what that would look like. I debated the issue a bit because I knew I’d be using the tagging feature of my image organizer, so folders would in a sense be irrelevant for locating images. Nevertheless, I decided to create folders for years; I decided against folders for months.

To get my pictures to have names that followed a common naming scheme, I ran an image renaming script I wrote a couple of years ago. The script uses EXIF data to rename pictures by date (YYYY-MM-DD-nnn.jpg), or you can also ask it to rename based on a name, like “birthday” (birthday-nnn.jpg), or both (birthdayYYMMDD-nnn.jpg). Once the images were renamed, getting them into folders by year was simple: mv 2000-*.jpg 2000/ etc.

For my photo manager I really only considered two options: F-spot and jBrout because they both offer easy tagging capabilities. I ended up choosing jBrout for one reason: it writes tags as IPTC keywords. This means that my tags get saved with the picture, so if I ever decide to switch programs (likely :D), my tags will move with the pictures and not be stuck in jBrout. I discovered this is not the case with F-spot and almost all other photo managers in linux: tags are saved in a database. Switch apps, lose your tags.

Debian and Ubuntu users can get jBrout fairly easily. Add deb http://jbrout.free.fr/download/debian binary/ to your /etc/apt/sources.list, then run apt-get update followed by apt-get install jbrout.

This is really not to say anything bad about F-spot. In fact, I’d prefer it over jBrout as it has some editing features jBrout doesn’t. But jBrout really seems to get the tagging thing.

Now all I have to do is tag my photos! If I upload them to Flickr, the IPTC tags and jpeg comments will automatically become flickr tags and descriptions.

Note to Windows users: the latest Picasa2 also saves keywords as IPTC data.

Linux users might also be interested in XnView, which is freeware for noncommercial use. I don’t think it’s free-as-in-speech software, i.e. not GPL’d. Nevertheless, it has a ton of features and can even edit IPTC and EXIF tags.

25 Responses to “Photo organizing in Linux”

  1. Régis

    My photo manager is kimdaba (KDE image database). It is simply brilliant. It offers tag capability, and tagging photos is much easier than with Spot. Really, if you haven’t seen it yet, you should give it a try.

  2. todd

    I actually looked at kimdaba, as well as gThumb, Gwenview, showimg, and digiKam. These all handle tagging (even GQview does), but again I need something portable such that after I spend hours tagging images with keywords, if I decide to switch apps or the database fails I don’t lose my work. jBrout and XnView are the only two linux apps I’ve found that write/edit IPTC tags. I agree that F-spot’s tagging UI could be better!

  3. Larry Ewing

    The latest versions of f-spot have internal support for storing the tags as dc:subjects in XMP metadata in the jpeg file but it isn’t turned on at the moment. It could easily be extended to save the data as IPTC keywords as well, F-Spot includes and IPTC parser that supports writing, it just hasn’t been done yet. These feature will be exposed soon, they simply require a little more testing and thought.

  4. todd

    That’s great news, Larry. Thanks for the update!

  5. Håkan

    Thanks for the exif script. It just saved me as I googled around for a quick way to rename the photos me and my girlfriend took (using three different cameras) on our recent Borneo trip.

  6. Brian

    Thank you for your renamer script; it saved me a lot of work!

  7. SitePoint Blogs » Open Source Image Archiving: Exif, IPTC, XMP and all that

    […] In the Open Source / Linux space, there are a couple of contenders which are getting it “right”, namely F-spot (C# / Mono) and jbrout (python / wxpython). Both are capable of storing metadata in the image but there are limitations, e.g. jbrout has no awareness of XMP. Some worthwhile blogs (and comments) to read are How to manage EXIF, XMP metadata on linux gnome kde, Managing Photographs and Photo organizing in Linux. […]

  8. Simon’s Blog » Blog Archive » Bright Ideas II: Photo Tagging

    […] http://ceitl.zanestate.edu/blog/archives/2005/11/photo-organizing-in-linux/ […]

  9. Big IDEA » Picture metadata

    […] I wrote about photo organizing in linux earlier, and while I haven’t done much experimenting with Windows apps, I know that Picasa2 allows you to save keywords for images. I think these are saved as IPTC for XMP data (please test before you tag all your files!). I wish, though, that google would allow for a simpler interface for tagging (adding keywords) to photos. The Picasa2 UI really favors labelling photos in broad terms, such as “R & A’s wedding,” but if you want to tag a photo with “R A wedding cake funny,” you’ll have to work a little harder. […]

  10. Marco

    I am trying digikam. The new 0.9 version (still beta) can store tag, rating and comments in IPTC fields.
    The interface is elegant and well designed. I think this app is good alternative to both jBrout and F-Spot.

  11. Martin

    There is at least one more application able to read, write, edit and search IPTC data.
    Mapivi (http://mapivi.de.vu).
    It makes tagging easy (hierarchical keywords, add multiple keywords to multiple pictures at once), supports all IPTC tags and stores all information in the picture. Mapivi offers complex searches for meta data (IPTC, EXIF, JPEG comments), leaves all pictures in your folder structure and the new actual version offers tag clouds and browsing by timeline.

    Regards
    Martin

  12. Ken Rushia

    Googled for “linux rename photos” and got you as link #1. Thanks for the renaming script, it’s just what I needed. This article may be well over a year old, but your script is still saving lives.

    Keep up the good work!
    -Ken

  13. wedding supplies

    I’ll have to try those tools out. I’m a big linux fan but currently have most of my pics on a windows box. I need to move them over

  14. links for 2007-09-11 « Stand on the shoulders of giants

    […] Big IDEA » Blog Archive » Photo organizing in Linux (tags: jbout photo organizing linux software) […]

  15. Big IDEA » Blog Archive » Script: Rename images by EXIF date

    […] earlier post on photo organizing in linux contained a script I wrote to rename pictures based on the EXIF date. However, since I’ve […]

  16. Nick

    I use digiKam, a nifty open source tool for managing pictures for KDE.

    Regards,
    Open Source in Israel

  17. shesek

    thanks, that works great on ubuntu.

  18. Chad B.

    sightful, I didn´t know other apps
    had similar functionality to organize
    using IPTC tags. I had ideas like these
    a while back. Using jBrout after realising
    I had amassed lots of photos, embedded
    tags in the images made lots of sense.

    Now if the tagging methods will
    cooperate :)

  19. jhead EXIF editor « Sergei Sergejev

    […] unbearable. And it saves comments/tags to local database, not the image itself Look here and here Possibly related posts: (automatically generated)I take too many photosCNET.com: Tekzilla Daily: OS […]

  20. Andriy

    Why did you not try RenRot (http://freshmeat.net/projects/renrot/)?
    Actually it’s included at least to Fedora/Ubuntu/Debian.

  21. Andrea

    Apparently now F-Spot saves metadata in the file itself.

  22. Me

    This is a very interesting blog entry for me.

    I’ve got about 15,000 images that I have taken over the years. All are just stored in the folder that they were downloaded in when taken off the camera. Ie, I have an unorganized mess. Nothing is tagged.

    I agree with the author that the photo data cannot be stored in a database ! Applications change, technology changes, etc. Images last forever and the information needs to stay with the images if a new management application is chosen.

    I too have used gqview until now. Its great, but I don’t think its being developed anymore and I think it needs more features added.

    I checked out kphotomanager. The 3 minute walk through on the website looks great, but it was buggy when I ran it in Fedora 10 and it uses a database to store information. Another thing I don’t like is that it FORCES the user to pick a single root directory to store the images in. That won’t work for me. jbrout has no such limitation.

    Luckily jbrout is written in Python and I’m looking to do some Python programming. I think I am going to start doing some development for it.

  23. Me

    One thing I really hate is when a program just starts importing data like crazy before you even use it. Fspot is like that. You start it up and it goes wild finding all the images on your hard drive. I don’t want all my images cataloged in Fspot !

  24. free shells

    For those that just want to try Linux take a look at the free shells list http://on-net.info/shell-accounts/.

  25. bbot

    Script link 404s.