The READ_SRF procedure reads the contents of a Sun rasterfile and returns the image and color table vectors (if present) in the form of IDL variables.
READ_SRF only handles 1-, 8-, 24-, and 32-bit rasterfiles of type
RT_OLD
and
RT_STANDARD
. See the file
/usr/include/rasterfile.h
for the structure of Sun rasterfiles.
This routine is written in the IDL language. Its source code can be found in the file
read_srf.pro
in the
lib
subdirectory of the IDL distribution.
To open and read the Sun rasterfile named
sun.srf
in the current directory, store the image in the variable
image1
, and store the color vectors in the variables
R
,
G
, and
B
, enter:
READ_SRF, 'sun.srf', image1, R, G, B