[Top] [Prev] [Next]

6.3 The 8-Bit Raster Image Interface

The HDF library contains routines for reading and writing 8-bit raster image sets. The functions DFR8addimage, DFR8putimage and DFR8getimage are sufficient for most reading and writing operations.

6.3.1 8-Bit Raster Image Library Routines

The names of all C functions in the 8-bit raster image interface are prefaced by "DFR8" and the names of the equivalent FORTRAN-77 functions are prefaced by "d8". These routines are divided into the following categories:

The DFR8 function calls are further defined in Table 6B and in the HDF Reference Guide.

TABLE 6B - DFR8 Library Routines

Category
Routine Name
Description
C
FORTRAN-77
Write
DFR8addimage d8aimg Appends an 8-bit raster image to a file.

DFR8putimage d8pimg Writes an 8-bit raster image to an existing file or creates the file.

DFR8setcompress d8setcomp Sets the compression type.

DFR8setpalette d8spal Sets palette for multiple 8-bit raster images.

DFR8writeref d8wref Stores the raster image using the specified reference number.

None

d8sjpeg Passes the quality and compatibility factors needed for the JPEG compression algorithm.

Read
DFR8getdims d8gdims Retrieves dimensions for an 8-bit raster image.

DFR8getimage d8gimg Retrieves an 8-bit raster image and its palette.

DFR8getpalref None

Returns the reference number of the palette associated with the last image accessed.

DFR8lastref d8lref Returns reference number of the last element accessed.

DFR8nimages d8nims Returns number of raster images in a file.

DFR8readref d8rref Gets the next raster image with the specified reference number.

DFR8restart d8first Ignores information about last file accessed and restarts from beginning.



[Top] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF User's Guide - 07/21/98, NCSA HDF Development Group.