AGOCG logo
Graphics Multimedia VR Visualisation Contents
Training Reports Workshops Briefings Index
Back

Computer Graphics Metafile and MIME

Add a viewer for the MIME type

By defining a viewer for this Internet Media Type, you can have links to CGMs and send CGMs in multimedia email. The server sends CGMs with a type of image/cgm. Therefore you will need to map this type to a suitable external viewer.

Note:
CGM is now an official registered Media Type (original at isi) so it no longer needs the x- prefix. It is probably as well to configure your helper applications to accept image/x-cgm as well, until all the servers update their links.

Unix/X

On most Unix platforms, a file called .mailcap must be edited (or created, if you do not have one) in your home directory.

The ralcgm viewer comes in C source form and works on most Unix platforms with X Windows.

Add this line to the .mailcap file in your home directory:

image/cgm;      ralcgm -X %s

The Figleaf viewer by Carberry Technology has been discontinued. They are now supplying QuickView Plus by Inso.

MS-Windows

Most windows browsers provide a graphical interface for adding new Media Types, so all you need to do is find and download a suitable viewer.

The Figleaf viewer by Carberry Technology has been discontinued. They are now supplying QuickView Plus Version 4.0 by Inso. Trial versions are available for

A commercial product, MetaPICT by GSC Associates, can display CGMs on the Mac screen and can also convert them to PICT format.


Test It

Once you have done this (and on Unix, restarted your web browser if need be, so it re-reads the .mailcap file) try this link to a CGM:

You should see your CGM viewer come up and display the CGM. (If you are using ralcgm, click on the button marked Nx (next) to see the first image in the file.) The end result may look like this:

If that worked, try some more.


Serving your own CGM files

If you want to put CGM files on your own Web server, you will need to set things up so that the correct MIME information is sent in the headers. How this is done depends on the server. Many servers depend on the filename extension to generate the MIME type, so for example all CGM's would have names like foo.cgm..

CERN server

Add this line to the file config/httpd.conf:

AddType .cgm	image/cgm             8bit

and re-initialise the server with a kill -1 so it re-reads it's configuration files.

NCSA and Apache servers

Add this line to the file conf/mime.types:

image/cgm	cgm
and re-initialise the server with a kill -1 so it re-reads it's configuration files.

Netsite server

Add this line to the file https-80/config/mime.types:

type=image/cgm	exts=cgm
and use the GUI to make the server re-read it's configuration files.

Graphics     Multimedia      Virtual Environments      Visualisation      Contents