Off-line Preparation of Images



Next: The Image Delivery Up: The Electronic Beowulf Previous: Overview

Off-line Preparation of Images

Images are stored as TIFF files for archival purposes, however as most Web clients currently only support GIF format for in-line images, that is the format we deliver. This decision restricts us to 8-bit colour images.

Readers viewing a folio first see an image of the complete page and can then zoom in on the image. The overall image is scaled down by a factor of eight to fit within a rectangle of 290 by 384 pixels. Repeatedly zooming-in returns partial images that scaled down by a factor of four and then by two, before part of the full image is returned unscaled. To ensure a fast response we generate full images scaled down by a factor of two, four and eight; partial image views can then be cut from the appropriate scaled full image.

The captured images typically contain about 10,000-20,000 distinct colours and scaling the images tends to increase this number as pixel values are interpolated. Reducing the number of colours down to 256, as required for GIF images, is a slow process. On a SPARCstation 5, for a 24-bit colour, 2320 by 3072 pixel image, the process can take ten to fifteen minutes. It was therefore decided to reduce the number of colours in the image ahead of time. As zoomed-in views are generated by cutting a partial image from a full image file it is probable that the partial image does not use all the colours present in the full image. We therefore decided to reduce the number of colours in our prepared image files to 512, and perform the final reduction to 256 colours on-the-fly so as to lose the minimum of information.

We experimented with two freely available image manipulation packages, ImageMagick, written by John Cristy of du Pont de Nemour & Company, and NETPBM, which is a package based on PBMPLUS by Jef Poskanzer. Both are excellent packages but NETPBM appeared to have the edge on speed. A major difference between them is that ImageMagick provides a single program, convert, that performs all image conversions, while NETPBM consists of a number of small filter programs that each perform a single function. We felt that this approach was more suitable for prototyping and so for the time being we have settled on NETPBM for the on-the-fly image manipulation.

The Portable Pixmap (PPM) image format is used for the generated image files as it is a simple format that is amenable to rapid decoding. The files are named fxs.ppm, where f is the name of the folio and s is the scale factor, which is a single digit (0, 1, 2 or 3) that represents the power of 2 by which each pixel of the original image is reduced. These files are generated by

a simple script. (Only a GIF file is generated at scale factor 3, as this image is only delivered in its entirety.) The image preparation process takes about 20 minutes on a SPARCstation 5.



Next: The Image Delivery Up: The Electronic Beowulf Previous: Overview


Andrew Ford (andrew@icarus.demon.co.uk), Sat Sep 17 17:02:30 BST 1994