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_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.
READ_SRF, Filename, Image [, R, G, B]
A scalar string containing the name of the rasterfile to read.
A named variable that will contain the 2-D byte array (image).
Named variables that will contain the Red, Green, and Blue color vectors, if the rasterfile contains colormaps.
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
READ_SRF, 'sun.srf', image1, R, G, B
To load the new color table and display the image, enter:
TVLCT, R, G, B TV, image1