Dynamic Images and the Web


Summary

This is a collection of information and links for those interested in creating dynamic images.

What is a Dynamic Image

A dynamic image is one which is generated on-the-fly. The image will be update on subsequent visits to the page or in response to direct user input or other external factors. This differs from static images which change when the Web author explicitly updates the site.

How do I create Dynamic Images ?

Images can either be grabbed from an application or created from data sets using a graphics library. In-line images will be in CompuServe GIF format with JPEG and PNG as possible other alternatives. External images can be in any format as long as the user has a suitable viewer configured.

HTTP Headers

Image data can be returned directly to the user. In this case the correct MIME foramt header must be generated. This will be of the form:

    HTTP/1.0 200 ok
    MIME-Version: 1.0
    Date: Monday, 29-May-95 00:36:49 GMT
    Pragma: no-cache
    Content-Type: image/gif

    ... GIF DATA Follows

The content type should reflect the type of image data being sent. This enables the browser to decide how to interpret the data and whether to invoke an external application. There is a defined set of MIME image types, it's customary to prefix new types wth: x-. Notice the blank line between the header and the data. Don't forget this!

Caching

As the images are dynamic we don't want them cached by a proxy or the user's browser. We can either set the expiry date to the same as the data or use the Pragma: no-cache field. One disadvantage of using links to images, rather than returning the data directly, is that the header (and expiry dates) is generated by the server and image data then may be cached.

GD Library

The original graphics library for creating CompuServe GIF files. The libary is written in 'C' and supplied in source form. You will need to have a compiler and be able to code with the 'C' language being the easiest choice. A number of other tools are based on this library.

The author had no trouble building gd library on Unix and Windows platforms with the latter using MSVC.

GDIT

GD library Interpreter. A simple scripting language for the gd libarary. It has been built on Sun OS, Solaris, AIX, HP-UX and NeXTSTEP platforms as well as NT and 95. Source code is available for UNIX but there is an EXE for 95/NT. The home page has extensive documentation (which may also be helpful if you are using the raw gd library) and some nice demonstrations.

GDIT can take data sets from standard input and save images to standard output. It's also nice for setting transparent colors on GIF files and adding copyright notices.

HotJava

Wicked new programming language and browser concept from Sun. animations

Mozilla

Netscape Corp's Mozilla

Bicanic

Nick Bicanic's animations using Netscape's server push.


Home Up Index

Last Updated: Juy 25th, 1995. © 1995 DB Harvey-George, ITCP