3

I've googled about this for a while but to no avail. I have a huge amount of photos stored in several media and backed up in a cloud. Shotwell generates pretty large thumbnails which are quite good for getting an idea of both subject and quality of a photo. The thumbnails are organized in groups based on timestamps and original folders. I'd like to be able to browse a complete collection of the thumbnails even when the program has no access to a complete collection of the real photos (as a matter of fact, I don't have a complete collection of the photos in a single storage device). This would be very convenient to me for several reasons; I could browse them from several PCs with differently named home folders, I could tag them according to their storage location etc. The whole collection of the thumbnails would be reasonably light and I could easily update it with rsync. However, if Shotwell doesn't find the actual photos, it automatically moves the corresponding thumbs under a missing pictures heading and their structure is lost.

I have tried to directly import the thumbs into Shotwell, but the original timestamps and tags are gone. A possible way out would be, to automate a process of thumbnail generation and of folder structure generation based on timestamps, but before getting entangled in that I thought I better ask a question here. Do you know any tricks or tweaks -- or can you recommend any specific programs -- that would allow me to browse a (huge) collection of thumbnails without having access to the originals? I have a sense that programs of this kind must be in use somewhere but, as I said, I couldn't find out any. Thanks!

0

F-Spot is a good tool for image retrieval - though maybe just like Shot well.

I have a version of Ubuntu called Ubuntu Studio along side a normal Ubuntu distro.

With Ubuntu Studio, you have improved catalog of image, sound, and video programs, without forgetting what makes Ubuntu a great OS.

Look into that option - a dual-boot of Ubuntu and Ubuntu Studio (unless you want to install Ubuntu Studio into a VirtualBox or via Live-CD to try it out before installing.

You might be pleasantly surprised.

Steve

  • Thank you. I had a look at the specs of Ubuntu Studio and took the Tour. The software which comes with US is very good but (i) it doesn't solve my problem; (ii) it's extremely heavy on system resources. As it happens only one of my PCs can (barely) run Darktable. I am interested in a lightweight solution that would allow me to quickly browse my thumbs even from a netbook. -- Thus, I'm afraid I'm going to write my script... If I succeed, I'll post it ;-) – archie Jul 29 '14 at 22:08
1

Ok, I solved the problem with a script that generates a thumbnail database. ImageMagick must be installed for the script to run. The script requires two arguments specifying a Source photo path and a Target path. It recursively searches Source for JPG files and generates correctly oriented thumbnails with user-defined width and quality (just change JPG to something else if you wish; it handles all the file formats handled by IM). It generates two thumbnail databases:

(1) db in Target: thumbnails are arranged in a YYYY/MM/DD folder structure based on the original EXIF dates.

(2) db in Target.Mirror: thumbs are organized in a folder structure that precisely mirrors the structure of their source.

You can easily change the script to generate just one db. I paste here only the core of the script leaving out path checking and manipulation, arguments handling, echo messages, comments, etc. Source, Target and Mirror paths must have a trailing "/".

#!/bin/bash
# The following variables have to be initialized
# Source=<path_to_source/>
# Target=<path_to_target/>
# Mirror=<Target.mirror/>
# Width=<Thumbnail width> (experiment with 368, 416, 512, 1024)
# Quality=<Thumbnail quality> (0% to 100%: 95% is fine, try 75%)

   shopt -s globstar
   cd "$Source"
   for f in **
   do
      if ! ([[ -d "$f" ]]) && ([[ "$f" == *"JPG" ]] || [[ "$f" == *"jpg" ]])
      then
        echo -e "           ${\e[0;32m}" $Source$f${\e[0m}
        Date=$(identify -format "%[EXIF:DateTimeOriginal]" $f)
        FolderName="$Target${Date:0:4}/${Date:5:2}/${Date:8:2}"                     
        if ! [[ -d $FolderName ]]
        then
          mkdir -p "$FolderName"
        fi
        Filename="${f##*/}"
        convert "$Source$f" -thumbnail $Width -quality $Quality -auto-orient \
        "$FolderName/$Filename"
 # to preserve profiles such as EXIF data, replace line above with the following:
 #
 # convert "$Source$f" -resize $Width -quality $Quality -auto-orient
 # "$FolderName/$Filename"
 #
 # it takes a bit longer and thumbnails are bigger in size -- profiles use up
 # to 60K
        if ! [[ "${f%/*}" == "$f" ]]
        then
          if ! [[ -d "$Mirror""${f%/*}" ]]
          then
            mkdir -p "$Mirror${f%/*}"
          fi
        fi
        cp "$FolderName/$Filename" "$Mirror$f"
      fi
   done

The db is really lightweight (with Width set to 416 and a Quality of 95% the db size is about 1% of the original); copies of it can easily be kept in a notebook or in an android phone and Shotwell browses it lightning fast. If the script is run again with a new source (but with the same target and mirror) the existing dbs are updated. What can I say -- thank you, Gnu and Linux!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.