Routines (alphabetical) > Routines: H > HDF Routines > HDF_GR_FILEINFO

# HDF_GR_FILEINFO

This function retrieves the number of raster images and the number of global attributes for the HDF GR interface identified by the parameter gr_id, and stores them into the parameters n_images and n_file_attrs, respectively. The term “global attributes” refers to attributes that are assigned to the file instead of individual raster images. These attributes are created by HDF_GR_SETATTR with the object identifier parameter set to a HDF GR interface identifier (gr_id) rather than a raster image identifier (ri_id). HDF_GR_FILEINFO is useful in finding the range of acceptable indices for HDF_GR_SELECT calls.

## Syntax

Result = HDF_GR_FILEINFO(gr_id, n_images, n_file_attrs)

## Return Value

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

## Arguments

### gr_id

HDF GR interface identifier returned by HDF_GR_START.

### n_images

A named variable that will contain the number of raster images in the file.

### n_file_attrs

A named variable that will contain the number of global attributes in the file.

## Keywords

None

## Version History

5.2 | Introduced