[Top] [Prev] [Next]

9.6 Other Palette Routines

9.6.1 Querying the Number of Palettes in a File: DFPnpals

DFPnpals returns the total number palettes in a file and has the following syntax:

C:		num_of_pals = DFPnpals(filename);
FORTRAN:	num_of_pals = dpnpals(filename)
The parameter of DFPnpals is further defined in the following table.

TABLE 9F - DFPnpals Parameter List

Routine Name

[Return Type]

(FORTRAN-77)
Parameter
Parameter Type
Description
C
FORTRAN-77
DFPnpals

[intn]

(dpnpals)
filename

char *
character*(*)
Name of the HDF file.

9.6.2 Obtaining the Reference Number of the Most Recently Accessed Palette: DFPlastref

DFPlastref returns the reference number most recently used in writing or reading a palette. This routine is used for attaching annotations to palettes and adding palettes to vgroups.

The following calling sequence uses DFPlastref to find the reference number of the palette most recently written to an HDF file:

C:		status = DFPaddpal(filename, palette, width, height, compress);
		lastref = DFPlastref( );
FORTRAN:	status = dpapal(filename, palette, width, height, compress)
		lastref = dplref( )
DFPputpal or DFPgetpal can be used in place of DFPaddpal with similar results.



[Top] [Prev] [Next]

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