SDSC Image Tools

Looking at the various visualization packages introduced above, it becomes obvious that each supports one or more image file formats, and as Table 1 indicates, a large number of image file formats exists. During the preparation and manipulation of visualizations it is often necessary to convert an image that is stored in a certain file format, say gif (CompuServe Graphics Image Format file) into another format, say ps (PostScript image file) format in order to print the file on a PostScript printer, or, for example into pict (Apple Macintosh Quick Draw/PICT file) format in order to move the file to a Macintosh and use it with a package that handles pict file format.

The San Diego Supercomputer Center has developed a set of tools to manipulate images. These tools are available here. (You may also wish to check anonymous ftp at sdsc.edu to see if there is an even newer version of the collection.) One of these tools is imconv, which converts image file formats.

We will focus only on imconv in this section. Command line instructions for imconv are simple. They have the basic format:

where in- and outfilename should be specified with the extensions typically used for their file formats. If no meaningful extension is supplied, then their names need to be preceeded with the option -fileformat, for example -pix, to indicate their format. Additional information on imconv is available from the manual pages, which can be seen by typing

For online information on other imtools, refer to the manual pages for imscale, imgray, impaste, imflip, imcopy.

Here are some examples of how to use imconv. All image files for the following examples are supplied by CSEP.

Example 1

For this example you may either use the weather map provided in file CI082615.gif (dated 8/26/93), or you could retrieve an up-to-date weathermap from the National Weather Service, by executing the script

provided by CSEP. If you choose to run xcloud, xv will be invoked to display the weathermap. To display CI082615.gif, issue the command

This gif file can now be converted into a tiff (Tagged Image File) file with the command

and then viewed, again with xv,

or it could be converted into a postscript file by

Other supported file formats by imconv are:

Table 1 File Formats supported by SDSC imconv

Example 2

Convert the run-length encoded file movie.rle into an hdf file for viewing with XImage, which was introduced in section 5.3 on page 17, by issuing the command