[Top] [Prev] [Next]

15.8 Extracting 8-Bit Raster Images and Palettes from HDF Files: hdftor8

15.8.1 General Description

The hdftor8 utility extracts the raster images and/or palettes from an HDF file and stores them in one file that contains the raster image data and another that contains the palette data.

15.8.2 Command-line Syntax

hdftor8 input-HDF-filename [-i] [-v] [-r raster-image-filename] [-p palette-filename]
The option flags are described in Table 15H.

TABLE 15H hdftor8 Option Flags:
-i

Interactive Mode:

Program is executed in interactive mode.

-v

Verbose Mode:

Program is executed in verbose mode. Diagnostic messages are displayed during the session.

-r

Raster Image File Name:

The raster image file name immediately follows this flag.

-p

Palette File Name:

The palette file name immediately follows this flag.

The names given as the HDF format file, raster image file, and palette file are interpreted by hdftor8 as follows: For each raster image file, the file name is given the extension

.#.@.%
where # represents the raster image number from the HDF file, @ represents the x-dimension of the raster image and % represents the y-dimension of the raster image. For each palette file, the file name is given the extensions .#, where # represents the palette number from the HDF format file.

If no name is given for the raster image file, the default name img.#.@.% is assigned, where #, @, and % are defined as in the preceding paragraph. The default name for a palette file, if no name is specifically given in the command, is pal.#.

15.8.3 Examples

A file named denm.hdf contains three 512 x 256 raster images and three palettes. To store these images and palettes in separate raster image and palette files, use the following hdftor8 command:

hdftor8 denm.hdf
Six files are created, named img1.512.256, img2.512.256, img3.512.256, pal.1, pal.2, and pal.3.



[Top] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF User's Guide - 05/19/99, NCSA HDF Development Group.