[Back to Interface] [Prev] [Next]

DFR8getdims/d8gdims

intn DFR8getdims(char *filename, int32 *width, int32 *height, intn *ispalette)

filename IN:

Name of the HDF file

width OUT:

Number of columns in the next image in the file

height OUT:

Number of rows in the next image in the file

ispalette OUT:

Indicator of the existence of a palette

Purpose

Opens the file, finds the next image, retrieves the dimensions of the image, and determines whether there is a palette associated with the image.

Return value

Returns SUCCEED (or 0) if successful and FAIL (or -1) otherwise.

Description

DFR8getdims retrieves the dimensions of the image and indicates whether a palette is associated and stored with the image. If the file is being opened for the first time, DFR8getdims returns information about the first image in the file. If an image has already been read, DFR8getdims finds the next image. Thus, images are read in the same order in which they were written to the file.

Normally, DFR8getdims is called before DFR8getimage so that if necessary, space allocations for the image and palette can be checked, and the dimensions can be verified. If this information is already known, DFR8getdims need not be called.

Valid values of ispalette are: 1 if there is a palette, or 0 if not.

FORTRAN

integer function d8gdims(filename, width, height, ispalette)

character*(*) filename

integer width, height

integer ispalette



[Back to Interface] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF Reference Manual - 07/29/98, NCSA HDF Development Group.