== name == Pubpics == category == Digital Photography == author == Kevin Layer (mailto(layer@franz.com)). == author-image == == short-description == Create thumbnail galleries of photos for easy viewing of photographs on the web. == long-description == italic(pubpics) is a program that builds web pages from digital photos. That is, it takes as input a bunch of jpg's from a digital camera and produces nice looking web pages, with index pages containing thumbnails. A italic(thumbnail) is a very small version of the picture, just big enough that you can recognize the contents of the picture. The original digital pictures are resized into three sets of pictures, allowing viewers to sequentially or randomly browse in any size. The largest images can optionally have a copyright notice added to them. You use pubpics by starting with a directory contains digital pictures you want to convert into web pages. In the simplest form, you call pubpics this way: pubpics source-directory destination-directory After completion, italic(destination-directory) will contain an italic(index.htm) that can be viewed with any web browser. Each index page consists of a set of thumbnails. You can view the picture linked to the thumbnail by clicking on it. The index pages point to picture pages. Each index page contains navigation links to previous and subsequent index pages. Each picture page contains navigation links to previous and subsquent pictures pages and to the index page containing the thumbnail for this picture. Each picture page also contains a navigation link to the index page of a different size. Consider a set of web pages made from three digital pictures, a.jpg, b.jpg and c.jpg. Think of the pictures as occupying cells of a spreadsheet: small a.jpg | b.jpg | c.jpg --------------------- medium a.jpg | b.jpg | c.jpg --------------------- large a.jpg | b.jpg | c.jpg The italic(small) row consists of the smallest images, better viewed on a laptop, for example. The italic(medium) row consists of the middle sized images, and the italic(large) row contains the largest images. Each cell is linked to the cell to the left and/or right, and top and/or bottom. == examples == href(Here,http://www.franz.com/~layer/pictures/ILC2005-2/index_small.htm) is a web page made with pubpics. == instructions == There are, of course, lots of options. Here's a description of them: * bold(-a annotations-file) :: A file which contains annotations for pictures. The format of the file is an alist of (base-file-name . "annotation"). For example: ( ("20050807-1241-1600-S1IS.JPG" . "Adrian at the Santa Cruz boardwalk beach") ("20050807-1241-2600-S1IS.JPG" . "Adrian wrestling with the seaweed monster (he won)") ) The generated web pages for the above files will then be annotated with the given string. * bold(-B image-magick-root) :: The directory where ImageMagick binaries can be found. This is most useful on Windows, where there is a Windows convert.exe in the Windows\system32 directory. * bold(-c name) :: For the largest image size only, add a copyright notice in a border of the image. It will appear like this: Copyright (C) , * bold(-t title) * bold(-d description) :: The very top of each index page is annotated with the `title' and `description'. The title appears first, then the description. The title can be something like "Party at Sherry's House" and the description could be the date (i.e., "10/16/02"). The title will also appear on each picture page, but not the description. * bold(-n size) :: The maximum number of images on each index page will be set to `size'. It is best if it is a multiple of 3, since there are three thumbnails per row on each index page. * bold(-p) :: Pause after completion. This is useful when run from a script and you want to make sure there are no error messages in the Window before it closes. * bold(-V) :: Print version info and exit. * bold(-q) :: Enter quiet mode. That is, do not print informative messages that tell the progress of creating the destination directory. Since it can take a long time to process 3 sets of images for each picture, it can be handy passing the time by watching `pubpics' in non-quiet mode. * bold(-r) :: Recurse on the source directory. Normally, only .jpg's in the source directory are considered. `pubpics' will exit with status 0 if it can successfully make the files in the destination directory. == tutorial == First, you must download and install href(ImageMagick,http://www.imagemagick.org). They have binary releases for various platforms (Linux, FreeBSD, Mac OS X, Solaris and Windows with href(Cygwin,http://cygwin.com)). The example below was tested with version 6.2.4 on Linux and version 6.0.4 on Windows (with Cygwin). Once ImageMagick is installed, you can test it by doing: % convert logo: logo.gif and displaying the resulting italic(logo.gif) file in a browser. Next, you install pubpics: % tar zxf pubpics-1.31-linux-glibc-2.2.tar.gz -C /usr/local % cd /usr/local/bin % ln -s ../pubpics-1.31/pubpics . The above will install the binaries into /usr/local/pubpics-1.31/ and make a symbolic link to the binaries in /usr/local/bin. Now, test it out: % pubpics You should see a help message from pubpics when it is given no command line arguments. On Windows, put the contents of the zip file into some directory, say italic(c:\pubpics131), and put that directory in your PATH. The rest of the instructions will work the same for Windows and Linux, or any platform. For this example, we have a directory named italic(pictures) containing photos we want to publish. On Windows: bash$ pubpics -B c:/cygwin/bin -t foo pictures webdir collecting information: 12 pictures make html pages: small medium large make index pages: index.htm index_small.htm index_large.htm generate images: [1 of 12] 20050807-1241-1600-S1IS.JPG: thumbnail large medium small [2 of 12] 20050807-1241-2600-S1IS.JPG: thumbnail large medium small [3 of 12] 20050807-1244-4300-S1IS.JPG: thumbnail large medium small [4 of 12] 20050807-1245-4300-S1IS.JPG: thumbnail large medium small [5 of 12] 20050807-1245-4700-S1IS.JPG: thumbnail large medium small [6 of 12] 20050807-1245-5500-S1IS.JPG: thumbnail large medium small [7 of 12] 20050807-1246-0200-S1IS.JPG: thumbnail large medium small [8 of 12] 20050807-1246-0500-S1IS.JPG: thumbnail large medium small [9 of 12] 20050807-1248-1300-S1IS.JPG: thumbnail large medium small [10 of 12] 20050807-1248-4100-S1IS.JPG: thumbnail large medium small [11 of 12] 20050807-1249-5100-S1IS.JPG: thumbnail large medium small [12 of 12] 20050807-1250-1200-S1IS.JPG: thumbnail large medium small bash$ ls -l webdir total 19 -rw-r--r-- 1 layer None 853 Oct 16 2002 blank.gif -rw-r--r-- 1 layer None 388 Dec 31 2000 home.gif -rw-r--r-- 1 layer None 4064 Aug 24 10:29 index.htm -rw-r--r-- 1 layer None 4040 Aug 24 10:29 index_large.htm -rw-r--r-- 1 layer None 4040 Aug 24 10:29 index_small.htm drwxr-xr-x 2 layer None 0 Aug 24 10:30 large drwxr-xr-x 2 layer None 0 Aug 24 10:30 medium -rw-r--r-- 1 layer None 374 Dec 31 2000 next.gif drwxr-xr-x 5 layer None 0 Aug 24 10:29 pages -rw-r--r-- 1 layer None 384 Dec 31 2000 previous.gif drwxr-xr-x 2 layer None 0 Aug 24 10:30 small drwxr-xr-x 2 layer None 0 Aug 24 10:30 thumbs bash$ The italic(-B c:/cygwin/bin) was needed because on the Windows computer the test was run there is exists a italic(convert.exe) in the Windows italic(system32) directory. There are three important files created by pubpics in the italic(webdir) directory: * bold(index.htm): medium images are linked on this index page * bold(index_small.htm): small images are linked on this index page * bold(index_large.htm): small images are linked on this index page You can publish any of the tree index files. The rest of the files are support files and are needed for the correct rendering of the generated web pages. == home-url == == doc-url == == license == href(LLGPL,http://opensource.franz.com/preamble.html) == book == == references == == source-fooball == * Binary distribution for Windows users: href(pubpics-1.31-windows.zip,ftp://ftp.franz.com/pub/lispwire/pubpics/pubpics-1.31-windows.zip) * Binary distribution for Linux users: href(pubpics-1.31-linux-glibc-2.2.tar.gz,ftp://ftp.franz.com/pub/lispwire/pubpics/pubpics-1.31-linux-glibc-2.2.tar.gz) or href(pubpics-1.31-linux-glibc-2.2.tar.bz2,ftp://ftp.franz.com/pub/lispwire/pubpics/pubpics-1.31-linux-glibc-2.2.tar.bz2). * Source code: href(pubpics-1.31-src.tar.gz,ftp://ftp.franz.com/pub/lispwire/pubpics/pubpics-1.31-src.tar.gz) or href(pubpics-1.31-src.zip,ftp://ftp.franz.com/pub/lispwire/pubpics/pubpics-1.31-src.zip). == release-date == 8/23/2005 == release-version == 1.31 == status == Stable. == history == * 2005-8-23: 1.31 release -- bug fixes, add -p and -B command line args * 2003-2-26: 1.25 release -- bug fixes * 2001-6-5: 1.17 release -- bug fixes * 2001-4-18: 1.15 release -- bug fixes * 2000-12-31: initial release == acl-dependencies == == other-dependencies == Pubpics uses utility programs from href(ImageMagick,http://www.imagemagick.org). Pubpics has been tested with version 5.2.7 on Linux and 5.4.9 on Windows. Other later versions probably work, but I'm pretty sure ones earlier than 5.2.7 have problems. bold(It is known to work with 6.2.4 on Linux and 6.0.4 on Windows). == platform == Should work on ACL version 6.2 or later. == ad ==