The WRITE_PPM procedure writes an image to a PPM (TrueColor) or PGM (gray scale) file. This routine is written in the IDL language. Its source code can be found in the file write_ppm.pro in the lib subdirectory of the IDL distribution.
| Note |
WRITE_PPM, Filename, Image [, /ASCII]
A scalar string specifying the full pathname of the PPM or PGM file to write.
The 2D (gray scale) or 3D (TrueColor) array to be written to a file.
Set this keyword to force WRITE_PPM to use formatted ASCII input/output to write the image data. The default is to use the far more efficient binary input/output (RAWBITS) format.
image = DIST(100) WRITE_PPM, 'file.ppm', image
Introduced: 4.0