READ_PICT

The READ_PICT procedure reads the contents of a PICT (version 2) format image file and returns the image and color table vectors (if present) in the form of IDL variables. The PICT format is used by Apple Macintosh computers.

This routine is written in the IDL language. Its source code can be found in the file read_pict.pro in the lib subdirectory of the IDL distribution.

Calling Sequence

READ_PICT, Filename, Image [, R, G, B]

Arguments

Filename

A scalar string specifying the full pathname of the PICT file to read.

Image

A named variable that will contain the 2D image read from Filename .

R, G, B

Named variables that will contain the Red, Green, and Blue color vectors read from the PICT file.

Example

To open and read the PICT image file named foo.pict 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_PICT, 'foo.pict', image1, R, G, B

To load the new color table and display the image, enter:

TVLCT, R, G, B

TV, image1

See Also

WRITE_PICT