Re: Tgif - Simple Vector file format for Web?

William Cheng (william@CS.UCLA.EDU)
Tue, 1 Aug 95 23:25:49 EDT

In message <>, Daniel W. Connolly writes:
> In message <>, David Crossley writes:
> >The recent brief discussion on this list about the possibility of inline
> >Computer Graphics Metafile (CGM) is of great interest to us. We in the
> >geographic information community see this as a major step towards enabling
> >online delivery of spatially relevant information.
> The is not the first time I've heard this. OK. Perhaps it's
> time to do something about it. I've updated the
> page on graphics formats:

Another possibility for a simple vector file format is tgif's file format
(not ``transparent-gif''). Tgif is an X-based drawing freeware which has
been around since Apr/90. It became a ``hyper-structured-graphics''
editor/browser in its Dec/94 release. Objects (such as rectangles, ovals,
pixmaps, grouped objects, etc.) in a tgif file can have attributes such as
"href=http://...." so that when you click on them, you can hyperjump to
another URL which is also a tgif file. It also supports other attributes
such as "exec=..." which gives you java like client-side script execution.

Tgif's home page is <URL:>.

> to mention some issues I've seen discussed here: format negociation
> and CGM, for example.
> I'd like to see the following:
> 1. Some data on the web (i.e. available via HTTP, ftp, or gopher) in
> CGM format.

For tgif, its ``hyper-structured-graphics'' home page is at
<URL:>. You need to use
tgif to view it.

> 2. Some free CGM viewers, with documentation on how to use them
> as MIME viewers.

You can get tgif through the links at
<URL:>. MIME related
information can be found at
<URL:>. In case you have
trouble connecting to the above server, tgif source code can be obtained

> 3. Software for converting CGM to GIF/JPEG, as well
> as to Postscript, configured as a translator inside
> a web server.

Tgif can output files in PS/EPS/XPM/XBM/ASCII/GIF/ISMAP formats (it
needs pbmplus/netpbm for generating GIF and ISMAP). A direct translator
into GIF/JPEG is not available. However, it is possible to generate
PS/EPS/XBM files running tgif with the -print commandline option.

> 4. A discussion of CGM authoring tools (and/or
> conversion tools)

A few tools can generate tgif files (in addition to tgif):
Pstoedit reads in a PS/EPS file and generate a tgif file.
Gnuplot and xgraph are plotting programs. These software
are available at:

It works on many platforms (SunOS/Solaris/Linux/HP-UX/Alpha/RS6000/Irix/...).
If you want to build it, please see the comments in its Imakefile for
suggested compile flags.

> 4. Modular web browsers that can incorporate software like
> (2) as an OpenDoc part, OLE control, Fresco object, etc.

These are not available for tgif.

> 5. libraries for processing CGM, so that even monolithic
> browsers can use CGM inline.

These are also not available for tgif at this time.

A tgif file is just a bunch of Prolog facts. Sample Prolog files are
distributed with tgif for parsing a tgif file.

Bill Cheng // UCLA Computer Science Department // (310) 645-8328
4667 Boelter Hall // Los Angeles, California 90024 // USA
william@CS.UCLA.EDU      ...!{uunet|ucbvax}!!william
WWW Home Page: <URL:>