[Top] [Prev] [Next] [Bottom]

GRreadlut/mgrdlut/mgrclut

intn GRreadlut(int32 pal_id, VOIDP pal_data)
pal_id

IN:

Palette identifier of the target general raster image

pal_data

OUT:

Buffer for the palette data to be read

Purpose

Reads the palette referred to by the given palette identifier.

Return value

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

Description

This routine is commonly used in conjunction with a call to GRgetlutid.

Note that there are two Fortran-77 versions of this routine; one for buffered numeric data (mgrdlut) and the other for buffered character data (mgrclut).

Example

This example illustrates the use of GRreadlut:

     #include "hdf.h"

     int32 pal_id, ri_id, gr_id, stat;
     intn index;
     char pal_data[PALETTE_SIZE];
         ...
     index = GRnametoindex(gr_id, "Target image");
     ri_id = GRselect(gr_id, index);
     pal_id = GRgetlutid(ri_id, 0);
     stat = GRreadlut(pal_id, pal_data);
         ...

         
FORTRAN

integer function mgrclut(pal_id, pal_data)

integer pal_id

<valid numeric data type> pal_data(*)

integer function mgrdlut(pal_id, pal_data)

integer pal_id

character* (*) pal_data



[Top] [Prev] [Next] [Bottom]

hdfhelp@ncsa.uiuc.edu
HDF User's Reference Manual, Draft 06/09/97, NCSA HDF Development Group.