Home      Staff      Research       Links      Outreach      Software 

Digital Image Database Software Guide

Frank Monaldo

Contents

  1. Introduction
  2. Web Page for One Directory
  3. Web Page for Many Directories

Introduction

This software is IDL-based code used to organize digital jpeg images into webpages. Besides the software contained in library idldid, it is also necessary Ray Sterner's idlusr and idlusr2 software libraries in the IDL path. For those in the SRO group, all the necessary software is in the /common/idl_libs/ path. Bug reports or suggestions can be sent to f.monaldo@jhuapl.edu.

Web Page for One Directory

The basic unit of organization is a directory. In its simplest form, simply place all your jpg images in a directory. Let's us call that directory dir. The command

did_gen_web_page, 'dir', /genpre

will go in and create three directories dir/previews/, dir/thumbnails/, dir/text/. In the dir/previews/ preview images are created. In the dir/previews/ thumbnail images are created. The dir/text/ contains text files with information extracted from the images in text form.

In addition, the files index.html and index2.html in dir are also created. The first file is an HTML page showing the thumbnail images as they would appear in an old-fashioned contact sheet. The second file is also an HTML that shows the images in preview form with additional ancillary information about each image. The HTML files will link to each other.

Sample thumbnail image page. On each thumbnail image we can click at he bottom and bring up another window with either the preview image, the full size image, or information about the image.


Figure 1

Sample preview image page. Note the captions at the bottom of the each picture and the ancillary information on the side.


Figure 2

The did_gen_web_page command has a number of options and features:

  • /help: Prints out a help.
  • /quiet: Suppress output to the screen during processing.
  • /genpre: Generate preview and thumbnail images and text information files. If these directories and files are already created, you do not need this option.
  • The thumbnail pages are composed of 5 columns by default. Using the option ncol=n will create n columns.
  • The thumbnail size is by default 100 pixels and the preview image size is 400 pixels. The commands tsize=t and psize=p change these sizes to t and p pixels, respectively.
  • The thumbnail page by default will print out the name of the file, its size and the date. The commands /noname, /nodate, and /nosize will suppress these respectively.
  • Image files have names of the form image1.jpg. The program will find files if the filename extension is composed of jpg in any case combination. The files image1.jpg,   image2.JPG,   image3.jPg are all considered valid image file names.
  • If there is a subdirectory in dir named captions, the program will look for files named image1.txt. The contents of these files are used as captions in the preview web page.
  • The very top of the page has the name of the directory. If a title.txt is in the directory, its contents are substituted for the directory name.
  • If there is a label.txt file in the directory the contents of the file are printed under the title.
  • If both a head.txt and tail.txt file exist, then these are used before and after the images in the creation of the web pages. In this case, the presence of or lack of label.txt the title.txt files are ignored. This feature allows for greater customization of web pages.
  • order=order By default, this program will order images by date and then by alphabetical order. This default condition can be changed using the order option. If /order is set the program will look for an order.txt file the directory. This file contains a list of the full path name for the image files to be used in the order that will be displayed. If an order.txt file does not exist, one is created. A specific file other than order.txt can be specified with a command option of the form order='order_new.txt' .

Sometimes after one has created a number of directories, one may want to cross reference images. Let us say we have dir1, dir2, and dir3. Let us further assume we wish to create a web page with links to images in these multiple directories. Create a new directory dir4. In there, create a file called filelist.txt (Case important on unix systems). On each line of the file, provide the name of the files in the other directories, relative to dir4.

did_gen_web_page,'dir4'
will create a web page as if the files existed in there.

Web Page for Many Directories

After one has organized one's images in a number of directories, it may become necessary to organize multiple directories in a rational way. Let us assume we have a number of image directories dir1, dir2, dir3.... Let's place these images in a meta-directory call topdir. The command:

did_gen_mweb_page, 'topdir'

will create web page of links to the directories dir1, dir2, dir3....

This program will pass on the options of the did_gen_web_page commands such as /genpre and ncol=4.

The default is for the did_gen_mweb_page program is to go into the subdirectories and recreates the index.html and index2.html. The option /onlymain will suppress this default

In creating the meta webpage, the program will look for a label.txt file. Case is important for Unix systems. If the file exits, did_gen_mpage will use the contents of the file as a description in the meta page.


Figure 3

The command

did_gen_mweb_page, 'topdir', /genpre
is sort of a super command. Regenerating all the smaller images and web pages from the top level directory


Frank Monaldo,