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

HDF_DFR8_GETINFO

The HDF_DFR8_GETINFO procedure retrieves information about the current 8-bit HDF image.

Syntax

HDF_DFR8_GETINFO, Filename, Width, Height, Has_Palette

Arguments

Filename

A string containing the name of the file to be read.

Width

A named variable in which the width of the image is returned.

Height

A named variable in which the height of the image is returned.

Has_Palette

A named variable in which 1 is returned if a palette is present. Otherwise, 0 is returned.

Keywords

None

Examples

; Open the file myhdf.hdf:

h = HDF_OPEN('myhdf.hdf')

; Retrieve info about an image:

HDF_DFR8_GETINFO, 'myhdf.hdf', width, height, has_palette

; Print info about returned variables:

HELP, width, height, has_palette

; Close the HDF file:

HDF_CLOSE('myhdf.hdf')

IDL Output

WIDTH LONG = 536

HEIGHT LONG = 412

HAS_PALETTE LONG = 1

Example Code: For a more detailed example, see the file hdf_info.pro, located in the examples/doc/sdf subdirectory of the IDL distribution. Run the example procedure by entering hdf_info at the IDL command prompt or view the file in an IDL Editor window by entering .EDIT hdf_info.pro.

Version History

 

4.0

Introduced

See Also

HDF_DFR8_GETIMAGE, HDF_DFR8_NIMAGES, HDF_DFR8_READREF, HDF_DFR8_RESTART